pirony / ks-vue-scrollmagic

Vue plugin that makes using Scrollmagic with Vue a walk in the park
MIT License
45 stars 9 forks source link

$ksvuescr.$emit('destroy') throws an error #14

Open BarbaraWiacek opened 4 years ago

BarbaraWiacek commented 4 years ago

Hi, thanks for the plugin. I am using it in a project. However, when I try to destroy the scene with this.$ksvuescr.$emit('destroy') I get a following error:

ReferenceError: margins is not defined
    at ScrollMagic.Scene.removePin (ks-vue-scrollmagic.js?dcd8:10332)
    at ScrollMagic.Scene.eval (ks-vue-scrollmagic.js?dcd8:9984)
    at eval (ks-vue-scrollmagic.js?dcd8:9228)
    at Array.forEach (<anonymous>)
    at ScrollMagic.Scene.trigger (ks-vue-scrollmagic.js?dcd8:9226)
    at ScrollMagic.Scene.destroy (ks-vue-scrollmagic.js?dcd8:9366)
    at ScrollMagic.Controller.destroy (ks-vue-scrollmagic.js?dcd8:8755)
    at Vue.eval (ks-vue-scrollmagic.js?dcd8:13135)
    at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
    at Vue.$emit (vue.runtime.esm.js?2b0e:3882)

Do you know how to solve it?