Skip to Content
0
Former Member
Apr 24, 2014 at 01:49 PM

DS SDK: How to check if plugin is called in "design mode" or in browser?

34 Views

Dear SDK experts,

I just created a simple world-/europe map plugin based on Datamaps (http://datamaps.github.io/) which works fine when the dashboard is executed in the browser but crashs, when I drag my plugin into the design area (maybe it's called different) of design studio. As I found no easy way to debug my created js code directly in design studio, is there is simple check so I can call the "real" plugin code only when my dashboard is executed in the browser and for example display only a static image when it's called inside design studio?

This check would also help a lot in my other plugins and I am sure, I already saw some coding somewhere -hopefully you remember where.

Thank you very much in advance for answering my very first question here on SCN.

Best regards,

Oliver