moveable icon indicating copy to clipboard operation
moveable copied to clipboard

Feature Request: Add a "margin" parameter to always keep a minimum distance during drag to other target elements in scene

Open STO-2D opened this issue 1 year ago • 0 comments

Environments

  • Framework name:
  • Framework version:
  • Moveable Component version: 0.51.2
  • Testable Address(optional): https://codepen.io/STO-2D/pen/NWJKXLN

Description

My goal is to always keep at least a minimum distance (eg. lets say 20) to every target in the "scene". On Drag it should not be possible to move the target closer to another target than the value that was defined (20).

I can think of a new parameter (something like "margin" similar to the "padding" parameter. I've also tested the padding parameter but this does only expand the drag-aera and does not use these "new target bounds" for snapping/limiting the target.

Is there already a way to do this currently?

STO-2D avatar Dec 20 '23 12:12 STO-2D