xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable
https://xieziyu.github.io/angular2-draggable/
293 stars 103 forks source link

Issue with ngDraggable boundsCheck() if out of bounds. #229

Open nith822 opened 3 years ago

nith822 commented 3 years ago

After calling boundsCheck, and element is out of bounds, there are issues with dragging the element.

Element x position out of bounds: element cannot be dragged until after clicked once. Element y position out of bounds: element can only be dragged on x axis until clicked once.

Temporary fix by calling ngDraggable.ngAfterViewInit() after ngDraggable.boundsCheck()