Skip to content

Commit

Permalink
swap zoom from alt to ctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
PluharVit committed May 20, 2022
1 parent 4b782f9 commit 8d08969
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/timeline/src/lib/scroll/ScrollElement.js
Expand Up @@ -37,20 +37,20 @@ class ScrollElement extends Component {
el.addEventListener('wheel', this.handleWheel, {passive: false});
}
}


handleWheel = e => {
const { traditionalZoom } = this.props



// zoom in the time dimension
if (e.ctrlKey || e.metaKey || e.altKey) {
if (e.ctrlKey || e.metaKey) {
e.preventDefault()
const parentPosition = getParentPosition(e.currentTarget)
const xPosition = e.clientX - parentPosition.x

const speed = e.ctrlKey ? 10 : e.metaKey ? 3 : 1
const speed = e.ctrlKey ? 1 : e.metaKey ? 3 : 1

// convert vertical zoom to horiziontal
this.props.onWheelZoom(speed, xPosition, e.deltaY)
Expand Down

0 comments on commit 8d08969

Please sign in to comment.