Updated Making OpenSeadragon Plugins (markdown)

iangilman 2013-08-21 09:40:37 -07:00
parent 2e38efcacd
commit 05b297b052

@ -1,3 +1,8 @@
We don't have a formal plugin architecture (though we're open to suggestions on that front). Basically you just create a new JS file that's intended to be loaded after openseadragon.js, and which patches OpenSeadragon in some way or another to enable your functionality. We don't have a formal plugin architecture (though we're open to suggestions on that front). Basically you just create a new JS file that's intended to be loaded after openseadragon.js, and which patches OpenSeadragon in some way or another to enable your functionality.
Once you have created your plugin, link to it from https://github.com/openseadragon/site-build/issues/26 and we'll get it on the directory. Once you have created your plugin, link to it from https://github.com/openseadragon/site-build/issues/26 and we'll get it on the directory.
Tips:
* `OpenSeadragon` is the namespace for all OpenSeadragon properties, classes, and methods. Adding a new top level function could be as simple as `OpenSeadragon.myFunc = function() { ... }`.
* If you want to add methods to any of OpenSeadragon's classes, add it to the class's prototype, such as `OpenSeadragon.Viewer.prototype.myFunc = function() { ... }`.