xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable

Home Page:https://xieziyu.github.io/angular2-draggable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initial Position breaks drag

RodrigoMtz10 opened this issue · comments

Hello!

I'm trying to set the initial position for a draggable div, and the positioning works, but whenever I want to drag the block, it disappears, could someone help me figuring out what I'm doing wrong?

Here's a stackblitz with my issue: https://stackblitz.com/edit/angular-9fwxev

Appreciate the help!!

I was able to find the issue, I was setting the coordinates as string: {x: "40", y: "40"}.

In order to make it work, I changed them to numbers: {x: 40, y: 40}. Working like a charm now.