Skip to content

Clunky drag and rotate #250

Answered by dbismut
zRelux asked this question in Q&A
Dec 30, 2020 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

I'm sorry to say but you're using this lib the wrong way 😅 In this case you should only use the drag gesture. The move gesture should only be used when hovering an element.

Here is a sandbox where I'm giving away some tricks on how to handle what I guess you want to do (use the yellow shapes):
https://codesandbox.io/s/suspicious-heisenberg-04e8v

I've had a look at your Ruler file and fixed it a bit to allow for resizing from the red handle.

But you can also have a look at the Alt (for alternative solution) file that uses svg to avoid trigonometry calculations. You should rather look at the logic rather than the actual implementation if you need to continue using divs.

(if you want to test…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@dbismut
Comment options

@zRelux
Comment options

@dbismut
Comment options

@zRelux
Comment options

@dbismut
Comment options

Answer selected by zRelux
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #250 on December 30, 2020 19:23.