Fix width and height when CSS transform scale is not 1 #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/scale-width"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
You seem to just be largely reverting the code to your patch here. What exactly is the problem this is supposed to solve? If you want the cursor with to scale along with the transform, just removing the division by the scale from halfWidth/halfHeight should be enough.
Because patch af2c980 has a drop cursor width bug, which is easier to find when the width of the cursor is large and the scale is small, e.g. drop cursor width = 10 and scale = 0.5, then the width of the cursor is calculated as 40px. the same problem exists with the height.
I was trying to fix the width bug on top of patch, but it didn't work or caused a new bug, so in this PR I just kept the patch code that automatically calculates the scale value and reverted the rest of the code back to my modification, which works correctly.
I tried just removing the division by the scale from halfWidth/halfHeight doesn't seem to fix the problem either. I found another similar solution though in PR https://github.com/ProseMirror/prosemirror-dropcursor/pull/20. Please check it out, thanks a lot!
Pull request closed