fatlinesofcode / ngDraggable

Drag and drop module for Angular JS
MIT License
629 stars 399 forks source link

Width of dragged element is not maintained when allowed-transform attribute is set to 'false' #238

Open dratchkov opened 8 years ago

dratchkov commented 8 years ago

This can be resolved by modifying line 257 to explicitly include width, like so:

element.css({'left':x+'px','top':y+'px', 'position':'fixed', 'width': element[0].offsetWidth+'px'});

-dave

dratchkov commented 8 years ago

A 'z-index' is also needed: element.css({'left':x+'px','top':y+'px', 'position':'fixed', 'width': element[0].offsetWidth+'px', 'z-index': 99999});