OpenLayers OpenLayers

Ticket #1157 (closed feature: fixed)

Opened 10 months ago

Last modified 1 month ago

VML coordsize values should be positive

Reported by: pgiraud Assigned to: tschaub
Priority: critical Milestone: 2.7 Release
Component: Renderer.VML Version: 2.5
Keywords: Cc:
State: Complete

Description

In the setExtent method of the VML renderer we set the coordsize attribute with one negative value which seems to be weird in some cases. I discovered the problem when playing with roundrect symbols.

Attached patch seem to give the same rendering results.

Attachments

setextent.patch (1.6 kB) - added by pgiraud on 11/20/07 04:42:52.
setextent.2.patch (3.4 kB) - added by ahocevar on 07/28/08 18:27:20.
new version, includes tests

Change History

(follow-up: ↓ 2 ) 11/19/07 11:46:51 changed by pgiraud

Please do not consider the vml.txt attached file !

(in reply to: ↑ 1 ) 11/19/07 11:48:06 changed by crschmidt

Replying to pgiraud:

Please do not consider the vml.txt attached file !

Removed.

11/20/07 04:42:34 changed by pgiraud

The proposed patch was wrong. Please consider this new patch.

I also found that in both SVG and VML, we try to calculate a value that is already stored. extent.getWidth() / resolution always return the same value as this.size.w

Please review.

11/20/07 04:42:52 changed by pgiraud

  • attachment setextent.patch added.

12/11/07 02:38:34 changed by fredj

  • keywords set to review.

12/12/07 14:42:00 changed by tschaub

  • keywords changed from review to tests.

This patch could use a bit more tweaking. First to bring it up to the trunk. Second to get tests passing. The setExtent tests don't call setSize first - so this.size is no longer cached there.

I'm using the "tests" keyword to indicate that this patch should include a test modification as well.

12/15/07 13:50:33 changed by crschmidt

  • state set to Needs More Work.

01/22/08 17:44:13 changed by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release.

Mass ticket move to 2.7 post dev meeting. If you are actively working on this task, please update this ticket with information and change the milestone to 2.6. At the time of the next IRC meeting (most likely 1-31-08), this will mean the ticket can *not* be brought back into 2.6 unless there is further feedback.

07/28/08 14:42:48 changed by euzuro

  • owner set to ahocevar.
  • priority changed from minor to critical.

07/28/08 18:27:20 changed by ahocevar

  • attachment setextent.2.patch added.

new version, includes tests

07/28/08 18:32:44 changed by ahocevar

  • owner changed from ahocevar to tschaub.
  • state changed from Needs More Work to Review.

Added tests. Note that extent.getWidth() / resolution will not always equal this.size.w, because extent.getWidth() might be negative, resulting in a negative value for the width. But that does not make any difference for the renderers, because it will just change their internal coordinate system.

Tests pass in FF3 and IE7.

07/29/08 05:43:57 changed by pgiraud

  • state changed from Review to Commit.

This looks good. Thanks for writing tests.

Please commit.

07/29/08 11:12:49 changed by ahocevar

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

(In [7586]) made coordsize positive for vector renderers; seems to fixe some strange behavior in the vml renderer, and brings a performance gain by using this.size instead of calculating the size from extent and resolution every time. r=euzuro (closes #1157)

07/29/08 11:25:56 changed by ahocevar

(In [7587]) sorry, had committed wrong versions of SVG.js and VML.js. Fixed now.(references #1157)