automat / controlkit.js

A lightweight controller and gui library
823 stars 82 forks source link

destorying a controlkit instance #23

Closed Jinnified closed 8 years ago

Jinnified commented 8 years ago

what's the correct way of destroying a controlkit instance? say i have create an instance and want to destroy it later explicitly

const controlKit = new ControlKit({ parentDomElementId: 'map1_ctrlkit' })

is there something like controlKit.destroy() ?

Jinnified commented 8 years ago

so i ended up change the source code, exposed 'initalised' variable, and set it to false, a big ugly hack, any suggestion would be appreciated

automat commented 8 years ago

there is currently no built-in way to do this, putting it on the feature requirements list.

apertureless commented 7 years ago

Are there any updates on this ? @automat It is super annoying, because I work in a project with Hot Module Replacing and each time I change something I have to fully reload the page, as I am getting a ControlKit is already initialized. error.

automat commented 7 years ago

@apertureless if there would have been an update i would have logged it here. All work is going into rewrite branch, there will be no updates on master from my side

Noext commented 4 years ago

no update on this ?