|
|
@@ -4,7 +4,6 @@ import EventDefDateMutation from '../../models/event/EventDefDateMutation'
|
|
|
import DragListener from '../../common/DragListener'
|
|
|
import HitDragListener from '../../common/HitDragListener'
|
|
|
import MouseFollower from '../../common/MouseFollower'
|
|
|
-import GlobalEmitter from '../../common/GlobalEmitter'
|
|
|
import Interaction from './Interaction'
|
|
|
|
|
|
|
|
|
@@ -57,7 +56,7 @@ export default class EventDragging extends Interaction {
|
|
|
|
|
|
handleMousedown(seg, ev) {
|
|
|
if (
|
|
|
- !GlobalEmitter.get().shouldIgnoreMouse() && // TODO: move to a deeper level
|
|
|
+ !this.component.shouldIgnoreMouse() &&
|
|
|
this.component.canStartDrag(seg, ev)
|
|
|
) {
|
|
|
this.buildDragListener(seg).startInteraction(ev, { distance: 5 })
|
|
|
@@ -72,12 +71,10 @@ export default class EventDragging extends Interaction {
|
|
|
0 : this.getSelectionDelay()
|
|
|
}
|
|
|
|
|
|
- if (!GlobalEmitter.get().shouldIgnoreMouse()) { // TODO: move to a deeper level
|
|
|
- if (component.canStartDrag(seg, ev)) {
|
|
|
- this.buildDragListener(seg).startInteraction(ev, settings)
|
|
|
- } else if (component.canStartSelection(seg, ev)) {
|
|
|
- this.buildSelectListener(seg).startInteraction(ev, settings)
|
|
|
- }
|
|
|
+ if (component.canStartDrag(seg, ev)) {
|
|
|
+ this.buildDragListener(seg).startInteraction(ev, settings)
|
|
|
+ } else if (component.canStartSelection(seg, ev)) {
|
|
|
+ this.buildSelectListener(seg).startInteraction(ev, settings)
|
|
|
}
|
|
|
}
|
|
|
|