Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to destroy (safely kill) movable instance? #14

Closed
probil opened this issue Jul 30, 2019 · 4 comments
Closed

Is it possible to destroy (safely kill) movable instance? #14

probil opened this issue Jul 30, 2019 · 4 comments
Assignees

Comments

@probil
Copy link

probil commented Jul 30, 2019

Hi, @daybrush

Is it possible to destory (safely kill) moveable instance? I mean, remove elements with moveable-control-box class from the DOM

As you know I created a simple POC on Vue.js but I have a problem - it doesn't work well with Hot Module Replacement.

I'm observing a strange behavior when new element created and old element is not removed.
Screenshot from 2019-07-31 00-36-03

I've checked documentation already - there is nothing about that.

Expected result: movable instance has destroy() method or moveable can reuse existing moveable-control-box

@daybrush daybrush self-assigned this Jul 31, 2019
@daybrush
Copy link
Owner

@probil
Your suggestions are very good. I will add it.

@daybrush
Copy link
Owner

@probil

0.5.0 is released. Added destroy method.

https://daybrush.com/moveable/release/latest/doc/Moveable.html#destroy

@standerpm
Copy link

hello @probil , is there a way to hide the box(frame)? thanks

@daybrush
Copy link
Owner

daybrush commented Aug 6, 2019

hello @standerpm

Add 'display: none' style directly or do as follows.

moveable.target=null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants