diff --git a/Making-OpenSeadragon-Plugins.md b/Making-OpenSeadragon-Plugins.md index bd20da2..bf51dc0 100644 --- a/Making-OpenSeadragon-Plugins.md +++ b/Making-OpenSeadragon-Plugins.md @@ -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. -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. \ No newline at end of file +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() { ... }`. \ No newline at end of file