Skip to content

Commit

Permalink
fix: ZoomIn/ZoomOut does not work after dragging an item (#271)
Browse files Browse the repository at this point in the history
* Check the target of the event and if dragging center to not update range.

* Do not use the simple hack

* Do not allow the event to be propogated.

* Fix comment

Co-authored-by: Yotam Berkowitz <[email protected]>
  • Loading branch information
Dallas Fraser and yotamberk authored Jan 31, 2020
1 parent 73a7e51 commit 36dbd3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/timeline/component/item/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ class Item {
item: me.id
});
});
this.hammerDragCenter.on('panstart', me.parent.itemSet._onDragStart.bind(me.parent.itemSet));
this.hammerDragCenter.on('panstart', event => {
// do not allow this event to propagate to the Range
event.stopPropagation();
me.parent.itemSet._onDragStart(event);
})
this.hammerDragCenter.on('panmove', me.parent.itemSet._onDrag.bind(me.parent.itemSet));
this.hammerDragCenter.on('panend', me.parent.itemSet._onDragEnd.bind(me.parent.itemSet));

Expand Down

0 comments on commit 36dbd3b

Please sign in to comment.