Ticket #2101 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Graphic Names example fails in FF3.x

Reported by: rdewit Owned by: ahocevar
Priority: minor Milestone: 2.8 Release
Component: Renderer.SVG Version: 2.8 RC2
Keywords: Cc:
State: Complete

Description

The graphic names example fails in FF 3.x. When hovering over the features, they jump around, except for the circle!

http://openlayers.org/dev/examples/graphic-name.html

I tested with the following browsers: Fail: FF 3.0.10 & FF 3.5-beta4-pre Pass: IE6/8, Chrome, Opera 9.64

The example only seems to fail in FF. The example in OL 2.7 works fine with the same FF, so this could be a regression.

Attachments

2101_workaround.patch Download (0.6 KB) - added by tschaub 4 years ago.
avoid the problem in FF
2101.patch Download (2.3 KB) - added by ahocevar 4 years ago.

Change History

Changed 4 years ago by tschaub

  • milestone changed from 2.8 Release to 2.9 Release

This is a browser issue and not a regression. Andreas is aware of this (unless we were talking about a different issue). The problem occurs when resizing the graphic, so the issue will not come up in all cases.

Changed 4 years ago by tschaub

  • milestone changed from 2.9 Release to 2.8 Release

So, it sounds like this may be a regression. Lets see what Andreas has to say.

Changed 4 years ago by tschaub

Ok, this came with r8766.

Changed 4 years ago by tschaub

avoid the problem in FF

Changed 4 years ago by tschaub

  • state set to Review

So, the code in Elements.js looks right to me. The code in SVG.js may need to account differently for nodes that already have a parent node. However, I've tweaked things for long enough and cannot get it to work (it is tempting to point to the browser for some of the weirdness).

The easiest way I've found to start debugging is to set a breakpoint in SVG setStyle (in the this.isComplexSymbol(style.graphicName) condition). Then I get things rolling with the following:

map.getControlsByClass(/Select/)[0].select(map.layers[0].features[0])

The circle symbol doesn't follow this path, and the jumpiness is about a mouseover immediately followed by a mouseout (as the feature moves from under your mouse).

Anyway, I don't like the workaround patch, but it works (at least it hides the regression for now). There are a few other workarounds in the SVG code that might need revisiting to patch this in a clean way.

Andreas, you may see a better immediate solution. I'll mark this one for your review.

Changed 4 years ago by ahocevar

Changed 4 years ago by ahocevar

 2101.patch fixes the issue by removing the node from the dom before modifying its attributes, and re-adding/inserting it afterwards.

Tested with graphic-name example in IE7, FF3, Chrome and Safari. Please review.

Changed 4 years ago by ahocevar

Forgot to mention that the above patch is also a replacement for previous workarounds for FF3 and Safari.

Changed 4 years ago by tschaub

  • state changed from Review to Commit

Looks great. Thanks for the better fix. Please commit.

Changed 4 years ago by ahocevar

  • keywords pullup added
  • state changed from Commit to Pullup

(In [9405]) Better fix for SVG rendering issues when redrawing complex graphics. Thanks tschaub for the investigation and the original patch which pointed me into the right direction. r=tschaub (pullup #2101)

Changed 4 years ago by crschmidt

  • keywords pullup removed
  • status changed from new to closed
  • state changed from Pullup to Complete
  • resolution set to fixed

(In [9406]) Pullups for OL 2.8 RC3.

jQuery lib fix (Closes #1391) getRenderedSize regression (Closes #1906) element.scrolls error with panzoombar (Closes #2054) createUrlObject bug (Closes #2060) google layer in late rendered maps (Closes #2075) IE6/Lang.nb bug (Closes #2093) Layer.TMS/TileCache bugs (Closes #2099) (Closes #2100) Graphic names issues (Closes #2101)

Note: See TracTickets for help on using tickets.