moveable icon indicating copy to clipboard operation
moveable copied to clipboard

When multiple boxes are selected, you will find that "moveable-control-box" will create multiple boxes

Open allenxie888 opened this issue 1 year ago • 1 comments

Environments

  • Framework name:vue3
  • Framework version:[email protected]
  • Moveable Component version:[email protected]
  • 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) WX20240401-164641

This problem will occur in my test version 0.47.0 or above。

allenxie888 avatar Apr 01 '24 08:04 allenxie888

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()
  }
}

SidIcarus avatar Apr 29 '24 16:04 SidIcarus