annotate client/digitallibrary/jquery/jquery.digilib.birdseye.js @ 814:40591c00ef41 jquery

small typo
author hertzhaft
date Mon, 21 Feb 2011 01:08:33 +0100
parents 136fc3320f50
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
1 /**
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
2 digilib bird's eye view plugin
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
3 */
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
4
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
5 (function($) {
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
6
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
7 // affine geometry plugin stub
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
8 var geom;
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
9
811
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
10 // digilib object
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
11 var digilib;
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
12
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
13 var FULL_AREA;
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
14
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
15 var buttons = {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
16 bird : {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
17 onclick : "showBirdDiv",
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
18 tooltip : "show bird's eye view",
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
19 icon : "birds-eye.png"
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
20 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
21 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
22
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
23 var defaults = {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
24 // is birdView shown?
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
25 'isBirdDivVisible' : false,
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
26 // dimensions of bird's eye div
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
27 'birdDivWidth' : 200,
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
28 'birdDivHeight' : 200,
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
29 // parameters used by bird's eye div
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
30 'birdDivParams' : ['fn','pn','dw','dh']
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
31 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
32
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
33 var actions = {
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
34 // event handler: toggles the visibility of the bird's eye window
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
35 showBirdDiv : function (data, show) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
36 var settings = data.settings;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
37 if (data.$birdDiv == null) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
38 // no bird div -> create
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
39 setupBirdDiv(data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
40 }
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
41 var on = digilib.fn.showDiv(settings.isBirdDivVisible, data.$birdDiv, show);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
42 settings.isBirdDivVisible = on;
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
43 digilib.fn.highlightButtons(data, 'bird', on);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
44 updateBirdDiv(data);
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
45 digilib.fn.storeOptions(data);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
46 }
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
47 };
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
48
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
49 // plugin installation called by digilib on plugin object.
811
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
50 var install = function(plugin) {
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
51 digilib = plugin;
808
ae8e98c479d5 stub for new plugins; overlay div for regions plugin
hertzhaft
parents: 799
diff changeset
52 console.debug('installing birdseye plugin. digilib:', digilib);
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
53 // import geometry classes
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
54 geom = digilib.fn.geometry;
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
55 FULL_AREA = geom.rectangle(0,0,1,1);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
56 // add defaults
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
57 $.extend(digilib.defaults, defaults);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
58 // add actions
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
59 $.extend(digilib.actions, actions);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
60 // add buttons
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
61 $.extend(digilib.buttons, buttons);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
62 // insert in button list -- not elegant
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
63 digilib.defaults.buttonSettings.fullscreen.standardSet.splice(9, 0, 'bird');
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
64 digilib.defaults.buttonSettings.embedded.standardSet.splice(5, 0, 'bird');
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
65 };
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
66
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
67 // plugin initialization
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
68 var init = function (data) {
808
ae8e98c479d5 stub for new plugins; overlay div for regions plugin
hertzhaft
parents: 799
diff changeset
69 console.debug('initialising birdseye plugin. data:', data);
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
70 var $data = $(data);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
71 // install event handler
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
72 $data.bind('setup', handleSetup);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
73 $data.bind('update', handleUpdate);
796
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
74 $data.bind('redisplay', handleRedisplay);
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
75 $data.bind('dragZoom', handleDragZoom);
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
76 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
77
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
78
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
79 var handleSetup = function (evt) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
80 console.debug("birdseye: handleSetup");
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
81 data = this;
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
82 // bird's eye view creation
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
83 if (data.settings.isBirdDivVisible) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
84 setupBirdDiv(data);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
85 data.$birdDiv.show();
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
86 }
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
87 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
88
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
89 var handleUpdate = function (evt) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
90 console.debug("birdseye: handleUpdate");
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
91 data = this;
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
92 if (data.settings.isBirdDivVisible) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
93 renderBirdArea(data);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
94 setupBirdDrag(data);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
95 }
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
96 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
97
796
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
98 var handleRedisplay = function (evt) {
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
99 console.debug("birdseye: handleRedisplay");
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
100 data = this;
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
101 if (data.settings.isBirdDivVisible) {
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
102 updateBirdDiv(data);
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
103 }
6aa9908303f1 added redisplay handler to birdseye. updated plugin docu.
robcast
parents: 795
diff changeset
104 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
105
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
106 var handleDragZoom = function (evt, zoomArea) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
107 //console.debug("birdseye: handleDragZoom za="+zoomArea);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
108 data = this;
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
109 if (data.settings.isBirdDivVisible) {
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
110 setBirdZoom(data, zoomArea);
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
111 }
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
112 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
113
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
114 // returns URL for bird's eye view image
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
115 var getBirdImgUrl = function (data) {
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
116 var settings = data.settings;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
117 var birdDivOptions = {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
118 dw : settings.birdDivWidth,
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
119 dh : settings.birdDivHeight
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
120 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
121 var birdSettings = $.extend({}, settings, birdDivOptions);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
122 // use only the relevant parameters
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
123 var params = digilib.fn.getParamString(birdSettings, settings.birdDivParams, digilib.defaults);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
124 var url = settings.scalerBaseUrl + '?' + params;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
125 return url;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
126 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
127
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
128 // creates HTML structure for the bird's eye view in elem
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
129 var setupBirdDiv = function (data) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
130 var $elem = data.$elem;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
131 // the bird's eye div
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
132 var $birdDiv = $('<div class="birdview" style="display:none"/>');
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
133 // the detail indicator frame
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
134 var $birdZoom = $('<div class="birdzoom" style="display:none; background-color:transparent;"/>');
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
135 // the small image
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
136 var $birdImg = $('<img class="birdimg"/>');
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
137 data.$birdDiv = $birdDiv;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
138 data.$birdZoom = $birdZoom;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
139 data.$birdImg = $birdImg;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
140 $elem.append($birdDiv);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
141 $birdDiv.append($birdZoom);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
142 $birdDiv.append($birdImg);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
143 // $birdZoom.css(data.settings.birdIndicatorStyle);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
144 var birdUrl = getBirdImgUrl(data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
145 $birdImg.load(birdImgLoadedHandler(data));
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
146 $birdImg.error(function () {console.error("error loading birdview image");});
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
147 $birdImg.attr('src', birdUrl);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
148 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
149
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
150 // update bird's eye view
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
151 var updateBirdDiv = function (data) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
152 if (!data.settings.isBirdDivVisible) return;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
153 var $birdImg = data.$birdImg;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
154 var oldsrc = $birdImg.attr('src');
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
155 var newsrc = getBirdImgUrl(data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
156 if (oldsrc !== newsrc) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
157 $birdImg.attr('src', newsrc);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
158 // onload handler re-renders
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
159 } else {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
160 // re-render
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
161 renderBirdArea(data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
162 // enable click and drag
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
163 setupBirdDrag(data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
164 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
165 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
166
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
167 // returns function for load event of bird's eye view img
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
168 var birdImgLoadedHandler = function (data) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
169 return function () {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
170 var $birdImg = $(this);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
171 var birdRect = geom.rectangle($birdImg);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
172 console.debug("birdImg loaded!", $birdImg, "rect=", birdRect, "data=", data);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
173 if (birdRect.width === 0) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
174 // malheureusement IE7 calls load handler when there is no size info yet
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
175 setTimeout(function () { $birdImg.triggerHandler('load'); }, 200);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
176 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
177 // update display (zoom area indicator)
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
178 digilib.fn.updateDisplay(data);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
179 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
180 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
181
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
182 // show zoom area indicator on bird's eye view
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
183 var renderBirdArea = function (data) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
184 if (data.$birdImg == null || ! data.$birdImg.get(0).complete) return;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
185 var $birdZoom = data.$birdZoom;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
186 var zoomArea = data.zoomArea;
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
187 var normalSize = digilib.fn.isFullArea(zoomArea);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
188 if (normalSize) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
189 $birdZoom.hide();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
190 return;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
191 } else {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
192 $birdZoom.show();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
193 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
194 // create Transform from current area and picsize
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
195 data.birdTrafo = digilib.fn.getImgTrafo(data.$birdImg, FULL_AREA);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
196 var zoomRect = data.birdTrafo.transform(zoomArea);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
197 console.debug("renderBirdArea:", zoomRect, "zoomArea:", zoomArea, "$birdTrafo:", data.birdTrafo);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
198 // acount for border width
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
199 var bw = digilib.fn.getBorderWidth($birdZoom);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
200 zoomRect.addPosition({x : -bw, y : -bw});
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
201 if (data.settings.interactionMode === 'fullscreen') {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
202 // no animation for fullscreen
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
203 zoomRect.adjustDiv($birdZoom);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
204 } else {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
205 // nice animation for embedded mode :-)
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
206 // correct offsetParent because animate doesn't use offset
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
207 var ppos = $birdZoom.offsetParent().offset();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
208 var dest = {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
209 left : (zoomRect.x - ppos.left) + 'px',
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
210 top : (zoomRect.y - ppos.top) + 'px',
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
211 width : zoomRect.width,
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
212 height : zoomRect.height
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
213 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
214 $birdZoom.animate(dest);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
215 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
216 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
217
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
218 // bird's eye view zoom area click and drag handler
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
219 var setupBirdDrag = function(data) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
220 var $birdImg = data.$birdImg;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
221 var $birdZoom = data.$birdZoom;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
222 var $document = $(document);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
223 var $scaler = data.$scaler;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
224 var startPos, newRect, birdImgRect, birdZoomRect, fullRect, scalerPos;
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
225 var bw = digilib.fn.getBorderWidth($birdZoom);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
226
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
227 // mousedown handler: start dragging bird zoom to a new position
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
228 var birdZoomStartDrag = function(evt) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
229 startPos = geom.position(evt);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
230 // position may have changed
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
231 data.birdTrafo = digilib.fn.getImgTrafo($birdImg, FULL_AREA);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
232 birdImgRect = geom.rectangle($birdImg);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
233 birdZoomRect = geom.rectangle($birdZoom);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
234 scalerPos = geom.position($scaler);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
235 newRect = null;
811
136fc3320f50 some small additions to birdview
hertzhaft
parents: 809
diff changeset
236 data.$elem.find(".overlay").hide(); // hide all overlays (marks/regions)
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
237 fullRect = digilib.fn.setZoomBG(data); // setup zoom background image
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
238 $document.bind("mousemove.dlBirdMove", birdZoomMove);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
239 $document.bind("mouseup.dlBirdMove", birdZoomEndDrag);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
240 return false;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
241 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
242
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
243 // mousemove handler: drag
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
244 var birdZoomMove = function(evt) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
245 var pos = geom.position(evt);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
246 var delta = startPos.delta(pos);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
247 // move birdZoom div, keeping size
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
248 newRect = birdZoomRect.copy();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
249 newRect.addPosition(delta);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
250 newRect.stayInside(birdImgRect);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
251 // reflect birdview zoom position in scaler image
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
252 var area = data.birdTrafo.invtransform(newRect);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
253 var imgArea = data.imgTrafo.transform(area);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
254 var offset = imgArea.getPosition().neg();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
255 offset.add(scalerPos);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
256 if (fullRect) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
257 var bgPos = fullRect.getPosition().add(offset);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
258 } else {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
259 var bgPos = offset;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
260 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
261 // move the background image to the new position
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
262 data.$scaler.css({
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
263 'background-position' : bgPos.x + "px " + bgPos.y + "px"
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
264 });
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
265 // acount for border width
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
266 newRect.addPosition({x : -bw, y : -bw});
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
267 newRect.adjustDiv($birdZoom);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
268 return false;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
269 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
270
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
271 // mouseup handler: reload page
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
272 var birdZoomEndDrag = function(evt) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
273 var settings = data.settings;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
274 $document.unbind("mousemove.dlBirdMove", birdZoomMove);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
275 $document.unbind("mouseup.dlBirdMove", birdZoomEndDrag);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
276 if (newRect == null) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
277 // no movement happened - set center to click position
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
278 startPos = birdZoomRect.getCenter();
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
279 birdZoomMove(evt);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
280 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
281 // ugly, but needed to prevent double border width compensation
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
282 newRect.addPosition({x : bw, y : bw});
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
283 var newArea = data.birdTrafo.invtransform(newRect);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
284 data.zoomArea = newArea;
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
285 digilib.fn.redisplay(data);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
286 return false;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
287 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
288
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
289 // clear old handler
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
290 $document.unbind(".dlBirdMove");
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
291 $birdImg.unbind(".dlBirdMove");
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
292 $birdZoom.unbind(".dlBirdMove");
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
293 if (! digilib.fn.isFullArea(data.zoomArea)) {
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
294 // set new handler
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
295 $birdImg.bind("mousedown.dlBirdMove", birdZoomStartDrag);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
296 $birdZoom.bind("mousedown.dlBirdMove", birdZoomStartDrag);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
297 }
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
298 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
299
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
300 // move bird zoom indicator to reflect zoomed detail area
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
301 var setBirdZoom = function(data, rect) {
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
302 var part = data.imgTrafo.invtransform(rect);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
303 // area = FULL_AREA.fit(part); // no, we want to see where we transcend the borders
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
304 birdTrafo = digilib.fn.getImgTrafo(data.$birdImg, FULL_AREA);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
305 var birdRect = birdTrafo.transform(part);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
306 var $birdZoom = data.$birdZoom;
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
307 // acount for border width
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
308 var bw = digilib.fn.getBorderWidth($birdZoom);
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
309 birdRect.addPosition({x : -bw, y : -bw});
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
310 birdRect.adjustDiv(data.$birdZoom);
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
311 };
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
312
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
313 // plugin object with name and init
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
314 // shared objects filled by digilib on registration
808
ae8e98c479d5 stub for new plugins; overlay div for regions plugin
hertzhaft
parents: 799
diff changeset
315 var plugin = {
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
316 name : 'birdseye',
793
63c1b33e38b1 documentation for new plugin api in jquery-digilib-plugin.txt.
robcast
parents: 791
diff changeset
317 install : install,
795
00d37112d062 birds eye view now as a plugin.
robcast
parents: 793
diff changeset
318 init : init,
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
319 buttons : {},
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
320 actions : {},
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
321 fn : {},
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
322 plugins : {}
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
323 };
799
12f790cb30de started to adapt regions plugin to new plugin mechanism
hertzhaft
parents: 796
diff changeset
324
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
325 if ($.fn.digilib == null) {
809
2985cdae5414 plugin name has changed to birdseye :-)
hertzhaft
parents: 808
diff changeset
326 $.error("jquery.digilib.birdseye must be loaded after jquery.digilib!");
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
327 } else {
808
ae8e98c479d5 stub for new plugins; overlay div for regions plugin
hertzhaft
parents: 799
diff changeset
328 $.fn.digilib('plugin', plugin);
791
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
329 }
304488c72344 first step to birdseye view as a plugin.
robcast
parents:
diff changeset
330 })(jQuery);