comparison client/digitallibrary/jquery/svg/jquery.digilibSVG.js @ 781:29de7131a5a8 jquery

make plugins available to other plugins
author hertzhaft
date Thu, 17 Feb 2011 22:50:32 +0100
parents 719f915496d6
children c1b94091b336
comparison
equal deleted inserted replaced
780:fd86688e6be0 781:29de7131a5a8
37 37
38 (function($) { 38 (function($) {
39 console.debug('installing jquery.digilibSVG'); 39 console.debug('installing jquery.digilibSVG');
40 40
41 var pluginName = 'digilibSVG'; 41 var pluginName = 'digilibSVG';
42 var geom = dlGeometry(); 42 var geom;
43 43
44 var defaults = { 44 var defaults = {
45 // choice of colors offered by toolbar 45 // choice of colors offered by toolbar
46 lineColors : ['white', 'red', 'yellow', 'green', 'blue', 'black'], 46 lineColors : ['white', 'red', 'yellow', 'green', 'blue', 'black'],
47 // default color 47 // default color
167 167
168 var actions = { 168 var actions = {
169 "init" : function(options) { 169 "init" : function(options) {
170 var $digilib = this; 170 var $digilib = this;
171 var data = $digilib.data('digilib'); 171 var data = $digilib.data('digilib');
172 var plugins = data.plugins;
173 geom = plugins.geometry.init();
172 var settings = $.extend({}, defaults, options); 174 var settings = $.extend({}, defaults, options);
173 // prepare the AJAX callback 175 // prepare the AJAX callback
174 // TODO: return unless interactiveMode === 'fullscreen'? 176 // TODO: return unless interactiveMode === 'fullscreen'?
175 var onLoadXML = function (xml) { 177 var onLoadXML = function (xml) {
176 settings.xml = xml; 178 settings.xml = xml;