[fix] Drag events not working on view mode change

- #61
This commit is contained in:
Faris Ansari 2018-05-19 21:19:47 +05:30
parent 45d218994d
commit 8f4214a926

View File

@ -581,11 +581,7 @@ export default class Gantt {
return is_dragging || is_resizing_left || is_resizing_right; return is_dragging || is_resizing_left || is_resizing_right;
} }
$.on( $.on(this.$svg, 'mousedown', '.bar-wrapper, .handle', (e, element) => {
this.layers.bar,
'mousedown',
'.bar-wrapper, .handle',
(e, element) => {
const bar_wrapper = $.closest('.bar-wrapper', element); const bar_wrapper = $.closest('.bar-wrapper', element);
if (element.classList.contains('left')) { if (element.classList.contains('left')) {
@ -617,8 +613,7 @@ export default class Gantt {
$bar.owidth = $bar.getWidth(); $bar.owidth = $bar.getWidth();
$bar.finaldx = 0; $bar.finaldx = 0;
}); });
} });
);
$.on(this.$svg, 'mousemove', e => { $.on(this.$svg, 'mousemove', e => {
if (!action_in_progress()) return; if (!action_in_progress()) return;