[Cartoweb-dev] initialising js plugins

Frederic Back fredericback at gmail.com
Wed Jul 18 07:11:55 EDT 2007


Hello,

I am currently developing a plugin that uses ajax, and I'd like the js
object to be initialised at startup. 

Currently, plugins like the tooltips or the location plugin get
initialised manually in the init method of AjaxPlugins.js. 

To solve this, I extended the AjaxPlugins class to allow other plugins
to register themselves to be triggered during startup. A patch against
current HEAD should be attached to this email.

Custom plugins can now registering themselves by appending themselves to
the initialisation list during startup, ie. like this:

        AjaxPlugins.initializablePlugins.push(AjaxPlugins.MyCustomPlugin);
        
Cheers,
Fred

-------------- next part --------------
A non-text attachment was scrubbed...
Name: AjaxPlugin_customInit.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/cartoweb-dev/attachments/20070718/7a9d4dfb/AjaxPlugin_customInit.bin


More information about the Cartoweb-dev mailing list