comparison client/digitallibrary/greyskin/diginew.jsp @ 451:a6c83fa262b2

still somewhat experimental intermediary release - Digilib is now an object with methods - in theory we could now have more than one digilib instance on a page - for compatibility one instance is created and wrapper methods exist - setting a mark recenters the view for some (unrelated) reason
author robcast
date Mon, 23 Jan 2006 22:36:29 +0100
parents 4255c09a8147
children 9c16290e6f44
comparison
equal deleted inserted replaced
450:4255c09a8147 451:a6c83fa262b2
107 107
108 // change icons if image functions are on 108 // change icons if image functions are on
109 function reflectImageStatus() { 109 function reflectImageStatus() {
110 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png"); 110 if (hasFlag("hmir")) setOnImage("hmir", "mirror-horizontal-on.png");
111 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png"); 111 if (hasFlag("vmir")) setOnImage("vmir", "mirror-vertical-on.png");
112 if (dlParams.isSet("brgt")) 112 if (hasParameter("brgt"))
113 setOnImage("brgt", "brightness-on.png", dlParams.get("brgt")); 113 setOnImage("brgt", "brightness-on.png", getParameter("brgt"));
114 if (dlParams.isSet("cont")) 114 if (hasParameter("cont"))
115 setOnImage("cont", "contrast-on.png", dlParams.get("cont")); 115 setOnImage("cont", "contrast-on.png", getParameter("cont"));
116 if (dlParams.isSet("rot")) 116 if (hasParameter("rot"))
117 setOnImage("rot", "rotate-on.png", dlParams.get("rot")); 117 setOnImage("rot", "rotate-on.png", getParameter("rot"));
118 if (dlParams.isSet("rgb")) 118 if (hasParameter("rgb"))
119 setOnImage("rgb", "rgb-on.png", dlParams.get("rgb")); 119 setOnImage("rgb", "rgb-on.png", getParameter("rgb"));
120 } 120 }
121 121
122 function onImgLoad() {
123 // make sure the image is loaded so we know its size
124 if (defined(scalerImg.complete) && !scalerImg.complete && !browserType.isN4 ) {
125 setTimeout("onImgLoad()", 100);
126 waited += 100;
127 return;
128 }
129 dlTrafo = parseTrafo(scalerImg);
130 // display marks
131 renderMarks();
132 reflectImageStatus(); // adjust icons
133 showOptions(isOptionDivVisible);
134 showBirdDiv(isBirdDivVisible);
135 showArrows(); // show arrow overlays for zoom navigation
136 moveCenter(true); // click to move point to center
137 // new Slider("sizes", 1, 5, 2);
138 focus();
139 }
140 122
141 // initialize digilib; called by body.onload 123 // initialize digilib; called by body.onload
142 function onBodyLoad() { 124 function onBodyLoad() {
143 document.id = 'digilib'; 125 document.id = 'digilib';
144 scalerDiv = getElement("scaler", true); 126 dl.onLoad();
145 scalerImg = getElement("pic", true); 127 dl.showOptions(isOptionDivVisible);
146 if (scalerImg == null && scalerDiv) { 128 reflectImageStatus(); // adjust icons
147 // in N4 pic is in the scaler layer 129 }
148 scalerImg = scalerDiv.document.images[0];
149 }
150 if ((!scalerImg)||(!scalerDiv)) {
151 alert("Sorry, digilib doesn't work here!");
152 return false;
153 }
154 setScalerImage(); // ruft auch dl_init() / initScaler auf
155 loadBirdImage(); // lädt das Bird's Eye Bild
156 //onImgLoad();
157 }
158 130
159 function onBodyUnload() { 131 function onBodyUnload() {
160 // alert(strObject(cookie)); 132 // alert(strObject(cookie));
161 cookie.store(); 133 cookie.store();
162 } 134 }
163 // base_init(); // now done on loading baselib.js 135
164
165 initParameters(); // load default values and detail
166 </script> 136 </script>
167 </head> 137 </head>
168 138
169 <body onload="onBodyLoad();" onunload="onBodyUnload();"> 139 <body onload="onBodyLoad();" onunload="onBodyUnload();">
170 140
247 </div> 217 </div>
248 218
249 <div class="button"> 219 <div class="button">
250 <a 220 <a
251 class="icon" 221 class="icon"
252 href="javascript:zoomBy(1.4)" 222 href="javascript:dl.zoomBy(1.4)"
253 > 223 >
254 224
255 <img 225 <img
256 class="png" 226 class="png"
257 id="zoom-in" 227 id="zoom-in"