Ticket #1690 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

freehand feature drawing is broken in IE

Reported by: tschaub Owned by: tschaub
Priority: critical Milestone: 2.7 Release
Component: Handler.Path Version: 2.6
Keywords: Cc:
State: Complete

Description

This is a regression.

http://openlayers.org/dev/examples/draw-feature.html

The draw feature controls are in freehand mode by default. In IE, you cannot draw unless you hold down shift (toggle out of freehand).

Attachments

1690-r7842-A0.patch Download (0.5 KB) - added by ahocevar 5 years ago.

Change History

Changed 5 years ago by euzuro

  • priority changed from minor to critical

regressions are bad news. let's be sure to get this fixed for 2.7

Changed 5 years ago by tschaub

Broke with r7546.

Changed 5 years ago by tschaub

(In [7802]) Temporary fix for weird vml rendering bug. (see #1690)

Changed 5 years ago by tschaub

Oddly, even calling feature.geometry.getBounds() in the drawFeature function causes the renderer failure (with no exception). This is all due to a linestring with no components - but we are supporting drawing of these elsewhere.

Changed 5 years ago by tschaub

  • type changed from feature to bug

Changed 5 years ago by ahocevar

Changed 5 years ago by ahocevar

  • state set to Review

The above patch fixes the issue. When moving the point and changing its coordinates, the bounds of the point also need to be cleared.

This one was hard to find. For whatever reason, IE fails without an exception before applying this patch. First I thought this was because Geometry.Point::clone does not clone the bounds, but that was not the reason. IE only fails when drawing the point, not the line in Handler.Path::drawFeature.

So the issue has nothing to do with a linestring with no components. Although the reason for the strange behaviour of IE is unclear to me, the patch seems obvious and works. All tests still pass.

Changed 5 years ago by elemoine

  • owner set to tschaub
  • state changed from Review to Commit
  • component changed from Renderer.VML to Handler.Path

Andreas, thanks for the patch, it looks good to me.

Changed 5 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [7859]) Clear point bounds after changing coordinates. Prevents strange behaviour of IE when doing getBounds(). r=elemoine (closes #1690)

Note: See TracTickets for help on using tickets.