Dragging & Resizing CSS Transformed Elements

前端 未结 7 986
难免孤独
难免孤独 2020-12-23 16:15

If for instance, we set a -vendor-transform: rotate(40deg) css attribute on a rectangle

, all the sudden dragging and resizing becomes
7条回答
  •  无人及你
    2020-12-23 17:01

    This, indeed, seems to be a bug in jQuery. An easy workaround would be: surround the resizable div with a container div. Set the .draggable() to the outer div and .resizable() to the inner div. This seems to be working fine in Chromium running on Ubuntu. See Fiddle.

    I've colored the outer div to give you an idea what's happening under the hood.

提交回复
热议问题