fatlinesofcode / ngDraggable

Drag and drop module for Angular JS
MIT License
631 stars 400 forks source link

problem with units in js #208

Open LamerVK opened 8 years ago

LamerVK commented 8 years ago

Hi. I'm trying to do an draggable element with copying and have one problem: if i dont set fixed width and height for element, wich used as a clone placeholder, in css, he had width and height as a 0. When i look into lib code in directive ngDragClone in onDragStart func i see this code: element.css('width', obj.element[0].offsetWidth); element.css('height', obj.element[0].offsetHeight); so it was provided. i'm just add units, like that: element.css('width', obj.element[0].offsetWidth + 'px'); element.css('height', obj.element[0].offsetHeight + 'px'); and everithyng was working good.