moveable icon indicating copy to clipboard operation
moveable copied to clipboard

I need help with function

Open rasfront opened this issue 1 year ago • 5 comments

@daybrush hello. Can you explain me how you to render this blue rectangle depends on gray divs

image

I need create such div with rotation which bounds gray divs with

rasfront avatar Nov 17 '22 17:11 rasfront

@Raserad There is a defaultGroupRotate option.

set defaultGroupRotate={40}

daybrush avatar Nov 19 '22 03:11 daybrush

@Raserad There is a defaultGroupRotate option.

set defaultGroupRotate={40}

Yes i know. I asked about how to render such rectangle by pure js? How to find coordinates such rectangle?

rasfront avatar Nov 19 '22 07:11 rasfront

@Raserad

You can set by setter

moveable.defaultGroupRoate = 40;

getRect has pos1, pos2, pos3, pos4 information and rotation information.

https://daybrush.com/moveable/release/latest/doc/Moveable.html#.RectInfo

moveable.getRect();

daybrush avatar Nov 20 '22 02:11 daybrush

@daybrush, I am trying to do the same as @Raserad asked earlier. When I group multiple targets into a group. I need to show the Rectangle to visualize the group without initializing Moveable.

I need your help to use the getRect() function to create an HTML Element that shows borders around grouped elements.

I have explained more in detail on this issue. https://github.com/daybrush/moveable/issues/1004

The function I wrote which works when elements are not rotated. But, as soon as I rotate elements, the calculation doesn't work.

Any help is appreciated 🙏🏻

jadiagaurang avatar Sep 07 '23 18:09 jadiagaurang

Hi @Raserad,

I am looking for something similar. Have you resolved the issue? If yes, please let me know how you resolved the issue.

jadiagaurang avatar Sep 07 '23 18:09 jadiagaurang