Open ctrl-brk opened 6 years ago
Thanks for your suggestion. The feature would be considered.
@xieziyu I see that you have implemented the feature in master. Would it be possible to provide a release with this feature.
@catchshyam Do you mean [trackPosition]
? It has been released in v1.1.0
@xieziyu The latest release I see is v1.1.0-beta.0.
And I think trackPosition is not included in that release. https://github.com/xieziyu/angular2-draggable/blob/v1.1.0-beta.0/lib/src/directive/angular-draggable.directive.ts
Ah you are right. I didn't publish the v1.1.0 release. Thank you very much @catchshyam
@xieziyu thank you for the release. Actually the feature was not exactly what I had in mind.
I have a floating modal which appears on a predefined position (let's call it original position) when user hovers on a particular element (lets call it hover target). Once the modal appears, user can drag and move the modal around on the screen (this is where I use this awesome directive). User can close the modal any time by clicking on the modal close button. After closing, if the user hovers again on the hover target, the modal should appear again at original position.
Now the issue is, once the user drags the modal, closes it and tries to open for the second time,
So what I am really looking for is an API to reset the drag position (which I will call when the user closes the modal). I will probably clone and make the changes. If you think the feature makes sense, let me know and I can make a pull request.
Thank you.
released this API in v1.2.0
Thank you @xieziyu . Works really well.
Hi. I'm using this beautiful directive with ngx-bootstrap modals. The issue is that if you open the modal (which opens at its default kind of centered position), drag it, close and open again it opens at the last dragged position not at default. Would be nice to be able to reset drag position so modals always open at their default.