Ticket #1042: renderer.2.patch
| File renderer.2.patch, 3.3 kB (added by pgiraud, 1 year ago) |
|---|
-
lib/OpenLayers/Renderer/Elements.js
old new 127 127 node._featureId = featureId; 128 128 node._geometryClass = geometry.CLASS_NAME; 129 129 node._style = style; 130 this.root.appendChild(node);131 130 132 131 //now actually draw the node, and style it 133 this.drawGeometryNode(node, geometry); 132 node = this.drawGeometryNode(node, geometry); 133 this.root.appendChild(node); 134 134 }, 135 135 136 136 /** … … 180 180 181 181 //set style 182 182 //TBD simplify this 183 this.setStyle(node, style, options, geometry);183 return this.setStyle(node, style, options, geometry); 184 184 }, 185 185 186 186 /** -
lib/OpenLayers/Renderer/SVG.js
old new 179 179 setStyle: function(node, style, options) { 180 180 style = style || node._style; 181 181 options = options || node._options; 182 183 182 if (node._geometryClass == "OpenLayers.Geometry.Point") { 184 183 if (style.externalGraphic) { 185 184 // remove old node … … 189 188 var _featureId = node._featureId; 190 189 var _geometryClass = node._geometryClass; 191 190 var _style = node._style; 192 this.root.removeChild(node);193 191 194 192 // create new image node 195 varnode = this.createNode("image", id);193 node = this.createNode("image", id); 196 194 node._featureId = _featureId; 197 195 node._geometryClass = _geometryClass; 198 196 node._style = _style; 199 this.root.appendChild(node);200 197 201 198 // now style the new node 202 199 if (style.graphicWidth && style.graphicHeight) { … … 247 244 if (style.cursor) { 248 245 node.setAttributeNS(null, "cursor", style.cursor); 249 246 } 247 return node; 250 248 }, 251 249 252 250 /** -
lib/OpenLayers/Renderer/VML.js
old new 157 157 var _featureId = node._featureId; 158 158 var _geometryClass = node._geometryClass; 159 159 var _style = node._style; 160 this.root.removeChild(node);161 160 162 161 // create new image node 163 varnode = this.createNode("v:rect", id);162 node = this.createNode("v:rect", id); 164 163 var fill = this.createNode("v:fill", id+"_image"); 165 164 node.appendChild(fill); 166 165 node._featureId = _featureId; … … 166 165 node._featureId = _featureId; 167 166 node._geometryClass = _geometryClass; 168 167 node._style = _style; 169 this.root.appendChild(node);170 168 171 169 fill.src = style.externalGraphic; 172 170 fill.type = "frame"; … … 249 247 if (style.cursor) { 250 248 node.style.cursor = style.cursor; 251 249 } 250 return node; 252 251 }, 253 252 254 253
