jQuery Resizable: doubling the resize width

前端 未结 2 1588
不思量自难忘°
不思量自难忘° 2021-01-23 09:31

Synopsis:

If you center a resizable element and expand it left/right, it has the illusion that it is only expanding half of the mouse movement.

Reason:

2条回答
  •  醉酒成梦
    2021-01-23 10:07

    I don't know how you center your resizable but this test case works well for me.

    At it's heart I do something similar to vol7ron but I use one assignment less and the calculation is better readable :D just joking choose what you like better fits you more

    ui.size.width += ui.size.width - ui.originalSize.width;
    

提交回复
热议问题