- Timestamp:
- 2015-03-11T10:12:30+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nz-flag-design/trunk/main-form/iterative-design.html
r29767 r29773 126 126 function reconfigureSvgCanvas(settings) { 127 127 console.log("*** entered reconfigureSvgCanvas"); 128 console.log("*** settings: " + settings.backgroundColor); 128 console.log("*** settings: background=" + settings.backgroundColor); 129 console.log("*** settings: w x h = " + settings.width + " x " + settings.height); 129 130 130 131 var design_frame = document.getElementById('design-2d-iframe'); 131 132 var svgCanvas = design_frame.contentWindow.svgCanvas; 132 133 var svgedit = design_frame.contentWindow.svgedit; 134 135 // Set the new canvas size 136 svgCanvas.setResolution(settings.width, settings.height); 133 137 134 138 var widthVar = settings.width; … … 186 190 // Centres the canvas (somewhat) 187 191 //svgCanvas.updateCanvas(100, 100); 192 188 193 } 189 194 … … 195 200 var la_y_dim = $(window).height() * 0.67; 196 201 197 $('#side-by-side').show(); 198 199 $('#side-by-side') 200 .liteAccordion({ theme : 'stitch', // 'light', 201 rounded : true, 202 //responsive : true, 203 containerWidth : la_x_dim, 204 containerHeight : la_y_dim, 205 onTriggerSlide : function() { 206 console.log("onTriggerSlide: this = " + this); 207 console.log("onTriggerSlide: id = " + this[0].id); 208 if (this[0].id == "render-3d-div") { 209 console.log("Triggering SVG-Editor exportPNG()"); 210 savePNGAsFile("PNG",null); 202 $('#side-by-side').show(10, 203 function() { 204 $('#side-by-side') 205 .liteAccordion({ theme : 'stitch', // 'light', 206 rounded : true, 207 //responsive : true, 208 containerWidth : la_x_dim, 209 containerHeight : la_y_dim, 210 onTriggerSlide : function() { 211 console.log("onTriggerSlide: this = " + this); 212 console.log("onTriggerSlide: id = " + this[0].id); 213 if (this[0].id == "render-3d-div") { 214 console.log("Triggering SVG-Editor exportPNG()"); 215 savePNGAsFile("PNG",null); 216 } 211 217 } 212 } 213 218 }); 219 }); 214 220 } 215 221 216 222 function activateSVGEditor() { 217 223 console.log("activateSVGEditor()"); 218 $('#design-2d-iframe').attr("src","svg-edit-trunk /editor/svg-editor.html?noStorageOnLoad=1");224 $('#design-2d-iframe').attr("src","svg-edit-trunk2/editor/svg-editor.html?noStorageOnLoad=1"); 219 225 $('#design-2d-iframe').load(function() { 220 226 console.log("*** loaded sgv iframe: " + this); … … 230 236 231 237 $(document).on("pageload",function(event,data){ 232 console.log( "Iterative Design Page: jquerymobile pageload()" 238 console.log( "Iterative Design Page: jquerymobile pageload()"); 233 239 if (!activatedAccordion) { 234 240 activateAccordion(); … … 251 257 $(document).on("pagebeforeshow",function(event,data) { 252 258 var active_page = $.mobile.activePage.attr("id"); 253 console.log(" Event: pagebeforeshow() for page " + active_page);259 console.log("Iterative-Design fielding Event: pagebeforeshow() for page " + active_page); 254 260 255 261 if (active_page == "iterative-design-page") {
Note:
See TracChangeset
for help on using the changeset viewer.