fix for dragging from phantom square broken (again)
This commit is contained in:
parent
21214dd5df
commit
a523c81f88
|
|
@ -91,7 +91,14 @@ $(function (){
|
|||
let square = $('#cb_phantom');
|
||||
if (square.length < 1) {
|
||||
square = $(`<div id="cb_phantom" class="cb-phantom"></div>`);
|
||||
square.hide().appendTo('body');
|
||||
square.hide().appendTo('body').droppable({
|
||||
accept: '.cb-piece',
|
||||
disabled: true,
|
||||
deactivate: function(ev, ui){
|
||||
$(this).droppable('disable');
|
||||
},
|
||||
drop: squareDropDestination,
|
||||
});
|
||||
}
|
||||
return square;
|
||||
} else if (where.match(/^[a-h][1-8]$/)) {
|
||||
|
|
@ -938,7 +945,7 @@ $(function (){
|
|||
}
|
||||
}
|
||||
|
||||
$('.cb-square, .cb-phantom').droppable({
|
||||
$('.cb-square').droppable({
|
||||
accept: '.cb-piece',
|
||||
disabled: true,
|
||||
deactivate: function(ev, ui){
|
||||
|
|
|
|||
Loading…
Reference in New Issue