When multiple boxes are selected, you will find that "moveable-control-box" will create multiple boxes
allenxie888 opened this issue · comments
Xie Lei commented
Environments
- Framework name:vue3
- Framework version:vue@3.2.41
- Moveable Component version:moveable@0.53.0
- Testable Address(optional): https://codesandbox.io/p/sandbox/youthful-saha-mtss5r?file=%2Fsrc%2FApp.vue
Description
When multiple boxes are selected, you will find that "moveable-control-box" will create multiple boxes. (As shown below)
This problem will occur in my test version 0.47.0 or above。
Alvaro Pareja-Lecaros commented
If you want to handle removing it, you can do so in the changeTargets
handler
let controlBox = undefined
function changeTargets(e) {
if (controlBox !== e.currentTarget.getControlBoxElement()) {
controlBox?.remove()
controlBox = e.currentTarget.getControlBoxElement()
}
}