I have a draggable canvas. I need to place a handler which is somewhere outside the div containing the canvas.
This is a canvas code:
<canvas width="700" height="500" class="ui-draggable" style="width: 450px; top: 257px; left: 200px;"></canvas>
I have a draggable canvas. I need to place a handler which is somewhere outside the div containing the canvas.
This is a canvas code:
<canvas width="700" height="500" class="ui-draggable" style="width: 450px; top: 257px; left: 200px;"></canvas>
There is a selector handle
Type: Selector or Element
Default: false
Restricts sort start click to the specified element.
Code examples:
Initialize the sortable with the handle option specified:
$( ".selector" ).sortable({
handle: ".handle"
});
See my JSFiddle for a live example. The elements can only be dragged by the orange handles that I have defined and created.
This is the case for all jQuery UI methods which use handles.