Ticket #7 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

deleting rule messes with other rules

Reported by: tschaub Owned by:
Priority: major Milestone: 0.1 GeoServer Demo
Component: Styler Keywords:
Cc: Total Hours: 0.0
Estimated Hours:


When I delete a rule using debug.html, symbolizers for other rules are modified. This occurs when closing the tab for the "< 2M" rule.

Change History

Changed 5 years ago by tschaub

Ok, not certain that this is the issue, but I see that the svg representing my feature looks like this:

<svg id="ext-comp-1011_svgRoot" width="20" height="20" viewBox="0 0 20 20">
    <g id="ext-comp-1011_root" transform="">
        <use id="OpenLayers.Geometry.Point_144" cx="10" cy="10" r="1" 
             href="#ext-comp-1011-square" width="18" height="18" x="1" y="1"
             transform="rotate(0, 10, 10)" fill="#4D4DFF" fill-opacity="0.7" 
             stroke="#000000" stroke-opacity="1" stroke-width="0.16666666666666666" 
             stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="none"/>

The problem is that there is no node with id ext-comp-1011-square.

Changed 5 years ago by tschaub

Ok, some more rough detail on the problem. The renderer caches symbol definitions on a node with id "ol-renderer-defs". If this node already exists, the factory returns the existing node. This node is then appended to the renderer root (removing it from whatever renderer root used to be its parent). If an element containing the renderer is removed, the root is removed along with the defs. The other renderer (whose root used to be the parent of the defs) still thinks this.defs is true (nobody ever sets that to false). So, you've got a renderer with this.defs true even though the "ol-renderer-defs" element is nowhere in the document. May not be the whole problem, but it is funky.

Changed 5 years ago by tschaub

The last comment is captured in  http://trac.openlayers.org/ticket/1849. This  change fixed the problem I was seeing.

Changed 5 years ago by tschaub

  • status changed from new to closed
  • resolution set to fixed

Whew. That took care of a few things. Andreas, I'm interested to hear if you think there is a problem with this change. If this needs to be reverted, we can reopen this ticket.

Note: See TracTickets for help on using tickets.