Changeset 4273
- Timestamp:
- 09/13/07 19:32:34 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Renderer/VML.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Renderer/VML.js
r4268 r4273 265 265 266 266 var bbox = geometry.getBounds(); 267 268 var resolution = this.getResolution(); 269 270 var scaledBox = 271 new OpenLayers.Bounds((bbox.left/resolution).toFixed(), 272 (bbox.bottom/resolution).toFixed(), 273 (bbox.right/resolution).toFixed(), 274 (bbox.top/resolution).toFixed()); 267 if(bbox) { 268 var resolution = this.getResolution(); 275 269 276 // Set the internal coordinate system to draw the path 277 node.style.left = scaledBox.left; 278 node.style.top = scaledBox.top; 279 node.style.width = scaledBox.getWidth(); 280 node.style.height = scaledBox.getHeight(); 281 282 node.coordorigin = scaledBox.left + " " + scaledBox.top; 283 node.coordsize = scaledBox.getWidth()+ " " + scaledBox.getHeight(); 270 var scaledBox = 271 new OpenLayers.Bounds((bbox.left/resolution).toFixed(), 272 (bbox.bottom/resolution).toFixed(), 273 (bbox.right/resolution).toFixed(), 274 (bbox.top/resolution).toFixed()); 275 276 // Set the internal coordinate system to draw the path 277 node.style.left = scaledBox.left; 278 node.style.top = scaledBox.top; 279 node.style.width = scaledBox.getWidth(); 280 node.style.height = scaledBox.getHeight(); 281 282 node.coordorigin = scaledBox.left + " " + scaledBox.top; 283 node.coordsize = scaledBox.getWidth()+ " " + scaledBox.getHeight(); 284 } 284 285 }, 285 286 … … 388 389 */ 389 390 drawCircle: function(node, geometry, radius) { 390 391 var resolution = this.getResolution(); 392 393 node.style.left = (geometry.x /resolution).toFixed() - radius; 394 node.style.top = (geometry.y /resolution).toFixed() - radius; 395 396 var diameter = radius * 2; 391 if(!isNaN(geometry.x)&& !isNaN(geometry.y)) { 392 var resolution = this.getResolution(); 397 393 398 node.style.width = diameter; 399 node.style.height = diameter; 394 node.style.left = (geometry.x /resolution).toFixed() - radius; 395 node.style.top = (geometry.y /resolution).toFixed() - radius; 396 397 var diameter = radius * 2; 398 399 node.style.width = diameter; 400 node.style.height = diameter; 401 } 400 402 }, 401 403
