I have a container that I made draggable with this in its config :
draggable: {
direction: 'horizontal',
constraint: {
min: { x: 0, y: 0 },
max: { x: parseInt(screen.width-57), y: 0 }
},
listeners: {
dragstart: function(panel, e, offset){
},
drag: function(panel, e, offset){
},
dragend: function(panel, e, offset){
},
scope: this
},
}
It’s work fine. Now I would like to prevent the user from dragging the panel when the drag event is being fired. It might sound stupid but, this is to prevent the user to drag the panel directly, he would have to put his finger on the toolbar to drag the panel.
I’ve already tried a few things like
return false;
e.stopEvent();
e.stopPropagation();
e.preventDefault();
But none of them worked. Does anyone have an idea why ?
I finally changed the dragstart event to
and
return false;worked fine…