Moveable: Is it possible to destroy (safely kill) movable instance?

Created on 30 Jul 2019  路  4Comments  路  Source: daybrush/moveable

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

Feature complete

Most helpful comment

hello @standerpm

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

moveable.target=null

All 4 comments

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

@probil

0.5.0 is released. Added destroy method.

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

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

hello @standerpm

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

moveable.target=null
Was this page helpful?
0 / 5 - 0 ratings

Related issues

masoudelahi picture masoudelahi  路  5Comments

darsodango picture darsodango  路  3Comments

tesmem101 picture tesmem101  路  3Comments

monsterooo picture monsterooo  路  4Comments

MiiZZo picture MiiZZo  路  3Comments