OpenLayers OpenLayers

Changeset 7341

Show
Ignore:
Timestamp:
06/10/08 16:39:03 (2 months ago)
Author:
tschaub
Message:

Adding px units where appropriate in style properties. Thanks Wally Atkins for the original patch. r=me (closes #1582)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/PanZoomBar.js

    r6833 r7341  
    187187                                      imgLocation + "zoombar.png",  
    188188                                      "absolute", null, "crop"); 
    189             div.style.height = sz.h
     189            div.style.height = sz.h + "px"
    190190        } else { 
    191191            div = OpenLayers.Util.createDiv( 
  • trunk/openlayers/lib/OpenLayers/Layer/VirtualEarth.js

    r6313 r7341  
    9696        var veDiv = OpenLayers.Util.createDiv(this.name); 
    9797        var sz = this.map.getSize(); 
    98         veDiv.style.width = sz.w
    99         veDiv.style.height = sz.h
     98        veDiv.style.width = sz.w + "px"
     99        veDiv.style.height = sz.h + "px"
    100100        this.div.appendChild(veDiv); 
    101101 
  • trunk/openlayers/lib/OpenLayers/Renderer/VML.js

    r7324 r7341  
    9999        OpenLayers.Renderer.prototype.setSize.apply(this, arguments); 
    100100 
    101         this.rendererRoot.style.width = this.size.w
    102         this.rendererRoot.style.height = this.size.h
    103  
    104         this.root.style.width = this.size.w
    105         this.root.style.height = this.size.h
     101        this.rendererRoot.style.width = this.size.w + "px"
     102        this.rendererRoot.style.height = this.size.h + "px"
     103 
     104        this.root.style.width = this.size.w + "px"
     105        this.root.style.height = this.size.h + "px"
    106106    }, 
    107107 
     
    170170                node.style.left = ((geometry.x/resolution)+xOffset).toFixed(); 
    171171                node.style.top = ((geometry.y/resolution)-(yOffset+height)).toFixed(); 
    172                 node.style.width = width
    173                 node.style.height = height;     
     172                node.style.width = width + "px"
     173                node.style.height = height + "px"; 
    174174                node.style.flip = "y"; 
    175175                 
     
    311311        var width = Math.round(style.graphicWidth || size * aspectRatio); 
    312312        var height = Math.round(style.graphicHeight || size); 
    313         node.style.width = width
    314         node.style.height = height
     313        node.style.width = width + "px"
     314        node.style.height = height + "px"
    315315         
    316316        // Three steps are required to remove artefacts for images with 
     
    328328            node.appendChild(image); 
    329329        } 
    330         image.style.width = width
    331         image.style.height = height
     330        image.style.width = width + "px"
     331        image.style.height = height + "px"
    332332        image.src = style.externalGraphic; 
    333333        image.style.filter = 
     
    361361 
    362362        node.style.left = Math.round( 
    363             parseInt(node.style.left) + imgBounds.left)
     363            parseInt(node.style.left) + imgBounds.left) + "px"
    364364        node.style.top = Math.round( 
    365             parseInt(node.style.top) - imgBounds.bottom)
     365            parseInt(node.style.top) - imgBounds.bottom) + "px"
    366366    }, 
    367367 
     
    412412             
    413413            // Set the internal coordinate system to draw the path 
    414             node.style.left = scaledBox.left
    415             node.style.top = scaledBox.top
    416             node.style.width = scaledBox.getWidth()
    417             node.style.height = scaledBox.getHeight()
     414            node.style.left = scaledBox.left + "px"
     415            node.style.top = scaledBox.top + "px"
     416            node.style.width = scaledBox.getWidth() + "px"
     417            node.style.height = scaledBox.getHeight() + "px"
    418418     
    419419            node.coordorigin = scaledBox.left + " " + scaledBox.top; 
     
    531531            var resolution = this.getResolution(); 
    532532         
    533             node.style.left = (geometry.x /resolution).toFixed() - radius
    534             node.style.top = (geometry.y /resolution).toFixed() - radius
     533            node.style.left = ((geometry.x /resolution).toFixed() - radius) + "px"
     534            node.style.top = ((geometry.y /resolution).toFixed() - radius) + "px"
    535535     
    536536            var diameter = radius * 2; 
    537537             
    538             node.style.width = diameter
    539             node.style.height = diameter
     538            node.style.width = diameter + "px"
     539            node.style.height = diameter + "px"
    540540        } 
    541541    }, 
     
    639639        var resolution = this.getResolution(); 
    640640     
    641         node.style.left = geometry.x/resolution
    642         node.style.top = geometry.y/resolution
    643         node.style.width = geometry.width/resolution
    644         node.style.height = geometry.height/resolution
     641        node.style.left = geometry.x/resolution + "px"
     642        node.style.top = geometry.y/resolution + "px"
     643        node.style.width = geometry.width/resolution + "px"
     644        node.style.height = geometry.height/resolution + "px"
    645645    }, 
    646646