Here is a sample code:
这是一个示例代码:
$('.bmc-div').click(function(e){
e.stopPropagation();
// console.log(e.target);
if ($(e.target).hasClass('my-sticky')) {
} else {
canvas.add_sticky($(this));
}
});
$('.bmc-div .sticky_container').sortable({
cursor: 'move',
revert: true,
helper: 'clone',
// handle: ".element-handler",
connectWith: '.bmc-div .sticky_container',
scroll: true,
cancel: null,
opacity: 0.7,
// axis: 'y',
items: ".my-sticky",
placeholder : "sticky-placeholder",
containment: "#main",
zIndex: 9999,
start: function(event, ui) {
event.stopPropagation();
},
stop: function(event, ui) {
event.stopPropagation();
},
update: function(event, ui) {
// update_sortable_position();
}
}).disableSelection();
$('.bmc-di