Ticket #1157: setextent.patch
| File setextent.patch, 1.6 kB (added by pgiraud, 1 year ago) |
|---|
-
lib/OpenLayers/Renderer/VML.js
old new 76 76 var resolution = this.getResolution(); 77 77 78 78 var org = extent.left/resolution + " " + 79 extent.top/resolution;79 (extent.top/resolution - this.size.h); 80 80 this.root.setAttribute("coordorigin", org); 81 81 82 var size = extent.getWidth()/resolution + " " + 83 -extent.getHeight()/resolution; 82 var size = this.size.w + " " + this.size.h; 84 83 this.root.setAttribute("coordsize", size); 84 85 // flip the VML display Y axis upside down so it 86 // matches the display Y axis of the map 87 this.root.style.flip = "y"; 85 88 }, 86 89 87 90 -
lib/OpenLayers/Renderer/SVG.js
old new 120 120 // Set the viewbox -- the left/top will be pixels-dragged-since-res change, 121 121 // the width/height will be pixels. 122 122 var extentString = left + " " + top + " " + 123 extent.getWidth() / resolution + " " + extent.getHeight() / resolution;123 this.size.w + " " + this.size.h; 124 124 //var extentString = extent.left / resolution + " " + -extent.top / resolution + " " + 125 125 this.rendererRoot.setAttributeNS(null, "viewBox", extentString); 126 126 },
