0 Replies Latest reply on Nov 18, 2013 12:23 PM by SergeyKritskiy

    remove event listener (Generator)

    SergeyKritskiy

      Hi everyone!

       

      Is there a way to completely remove event listener, when menu state is false?

      I've tried

       

      if (states["1"].checked == false) {generator.onPhotoshopEvent("imageChanged", fireJS);}
      else {generator.removePhotoshopEventListener("imageChanged", fireJS);}
      

       

      but it keeps register imageChanged event even if the plugin is disabled.

       

      Thanks!