Jump to content


How to refresh position of element when drag?

Recommended Posts

After I pulled out drag2 placeholder, it will resize to 50x (widthxheight). And meanwhile, drag2 was far position of the cursor. You click and drag the lower right corner to show the clearest.

Please view .


Please help me!

Thank you!

See the Pen ogYzgQ by vyquanghoa (@vyquanghoa) on CodePen

Link to comment
Share on other sites

Hi vyquanghoa  :)


Unfortunately i can't understand completely that what you mean and what's your problem ;

but i think maybe this simple Codepen demo can help you :


pls check this out : 

See the Pen bwHiC by MAW (@MAW) on CodePen


and pls let we know if you still have any problem .

Link to comment
Share on other sites

I think he's trying to say that when you try to drag the green square by holding it at the very right bottom edge,

and you go outside red bordered rectangle (#placeholder) and the square gets resized, the position of the cursor stays very far

from the center of the dragged square.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.