Elements became randomly non-resizable after dragging

前端 未结 1 1363
不知归路
不知归路 2021-01-21 10:25

After multiple elemens are selected and dragged, some of them are no more resizable: resize icon disappear from right corner.

Resizable icon remains in old place and doe

相关标签:
1条回答
  • 2021-01-21 11:12

    The problem is that the resizable icons are selectable as well, so when you include them in the lasso, they are selected and their top and left are changed when you drag.

    Selectable has a filter option that allows to specify which elements should be selectable. By setting it to '.designer-field' it should solve the problem.

    $(".designer-panel-body").selectable({
        filter: '.designer-field'
    });
    

    See: https://jsfiddle.net/kec4jgvf/1/

    0 讨论(0)
提交回复
热议问题