ProjectVisBug icon indicating copy to clipboard operation
ProjectVisBug copied to clipboard

Better rotate and delete

Open argyleink opened this issue 2 years ago • 8 comments

https://github.com/daybrush/moveable

shows a great interaction for removing and rotating elements

argyleink avatar Nov 09 '23 19:11 argyleink

removing elements can already be done by selecting and hitting the delete key, unless you were thinking of deleting multiple elements simultaneously at the time of writing this issue? (which i tested doesn't currently work in VisBug 0.4.6 for Firefox but does work in VisBug 0.4.10 for Chrome)

and were you thinking of using Rotatable under the Position Tool?

hchiam avatar Feb 19 '25 01:02 hchiam

Image

^ it's got the rotation handle there and the delete button

could be part of the Position Tool yep, and the delete button could just always be there.

argyleink avatar Feb 19 '25 21:02 argyleink

nice! i plan to work on this hopefully sometime next week

hchiam avatar Feb 19 '25 22:02 hchiam

minimal demo: https://codepen.io/hchiam/pen/xbxReqy

i can't seem to find a built-in delete button for moveable rotatable, so i'm assuming you got that working with some custom code with the ables option? https://daybrush.com/moveable/release/latest/doc/Moveable.html#.DefaultOptions-ables

hchiam avatar Feb 27 '25 22:02 hchiam

i found it via their demo page https://daybrush.com/moveable/, not sure what settings are needed

argyleink avatar Feb 27 '25 22:02 argyleink

for reference / note to self as i try to figure this out for vanilla js: https://github.com/daybrush/moveable/issues/246#issuecomment-635940004

hchiam avatar Feb 27 '25 22:02 hchiam

https://codepen.io/hchiam/pen/MYWbRxX?editors=0010

hchiam avatar Feb 27 '25 23:02 hchiam

i'm almost ready to make a PR, just need to figure out how to ignore selecting the delete button (the code that adds visbug-labels) and some other final tweaks (UPDATE: seems like editing notList in strings.js doesn't do anything, but isOffBounds in common.js does)

hchiam avatar Feb 28 '25 00:02 hchiam