Ticket #1042: render.patch
| File render.patch, 2.4 kB (added by crschmidt, 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 /** … … 145 145 * style - {Object} 146 146 */ 147 147 drawGeometryNode: function(node, geometry, style) { 148 console.log(node); 148 149 style = style || node._style; 149 150 150 151 var options = { … … 180 181 181 182 //set style 182 183 //TBD simplify this 183 this.setStyle(node, style, options, geometry);184 return this.setStyle(node, style, options, geometry); 184 185 }, 185 186 186 187 /** -
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 /**
