Mercurial > hg > digilib
comparison client/digitallibrary/jquery/jquery.digilib.birdseye.js @ 784:966d5c938b4c jquery
first step to birdseye view as a plugin.
author | robcast |
---|---|
date | Fri, 18 Feb 2011 10:39:40 +0100 |
parents | |
children | 912519475259 |
comparison
equal
deleted
inserted
replaced
783:16cff012d7c1 | 784:966d5c938b4c |
---|---|
1 /** required digilib geometry plugin | |
2 */ | |
3 | |
4 (function($) { | |
5 | |
6 // affine geometry plugin stub | |
7 var geom; | |
8 | |
9 var FULL_AREA; | |
10 | |
11 var actions = { | |
12 }; | |
13 | |
14 // init: plugin initialization | |
15 var plugInit = function(data) { | |
16 // import geometry classes | |
17 geom = digilib.fn.geometry; | |
18 FULL_AREA = digilib.fn.FULL_AREA; | |
19 // TODO: add actions | |
20 // TODO: add buttons | |
21 // TODO: add event handlers | |
22 }; | |
23 | |
24 | |
25 // plugin object with name and init | |
26 // shared objects filled by digilib on registration | |
27 var digilib = { | |
28 name : 'birdseye', | |
29 init : plugInit, | |
30 buttons : {}, | |
31 actions : {}, | |
32 fn : {}, | |
33 plugins : {} | |
34 }; | |
35 | |
36 if ($.fn.digilib == null) { | |
37 $.error("jquery.digilib.birdview must be loaded after jquery.digilib!"); | |
38 } else { | |
39 $.fn.digilib('plugin', digilib); | |
40 } | |
41 })(jQuery); |