Ticket #917 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Geometry: call clearBounds after a move or resize

Reported by: fredj Owned by:
Priority: major Milestone: 2.5 Release
Component: Geometry Version: SVN
Keywords: Cc:
State:

Description

The geometry bounds change after a move() or resize().

Attachments

Geometry.clearBounds.patch Download (0.6 KB) - added by fredj 6 years ago.
Geometry.clearBounds.2.patch Download (3.1 KB) - added by pgiraud 6 years ago.
patch with tests
Geometry.clearBounds.3.patch Download (4.3 KB) - added by pgiraud 6 years ago.
added clearBounds in resize, also simplified tests
geometry_test_point.patch Download (1.1 KB) - added by pgiraud 6 years ago.
tests miss getBounds() call so have no interest

Change History

Changed 6 years ago by fredj

Changed 6 years ago by fredj

  • cc review removed
  • keywords review added

Changed 6 years ago by crschmidt

fredj: Pierre and I discussed this in #666. We came to the conclusion that clearBounds might have a significant performance impact, and I wanted to get Tim's feedback on whether this was the right way to do things. I'll poke him again and see if he can offer thoughts on that, after which we can either apply this or get a new patch together that does something similar.

Is this to fix an issue other than #666?

Changed 6 years ago by pgiraud

I think this is somewhat different because it doesn't only deal with VML. If a feature is moved, resized or rotated and the user needs to know its new bounds, the getBounds() method does return the right value because it is "cached".

Changed 6 years ago by crschmidt

  • keywords needstests added; review removed

Ah, foolish me: This seems obvious. Hm. But probably needs a test. Can we write one?

Changed 6 years ago by pgiraud

patch with tests

Changed 6 years ago by pgiraud

  • keywords review added; needstests removed

Changed 6 years ago by crschmidt

clearBounds is not currently called in the collection either: this seems likely to cause the bug to remain in place. Pierre is looking at testing to see the current behavior.

Changed 6 years ago by pgiraud

added clearBounds in resize, also simplified tests

Changed 6 years ago by pgiraud

as said on the IRC:

I was writing a new test on collection move to test bounds update

and surprisingly the test pass well I first couldn't figure out why, and was looking what was wrong in my test but I discovered that clearBounds also clears the geometry's parent bounds

Changed 6 years ago by tschaub

  • keywords commit added; review removed

Thanks for catching this, correcting it, and writing tests.

All pass in IE/FF. (I tweaked the tests a bit - the bounds var was not used any more.)

Changed 6 years ago by tschaub

  • keywords commit removed
  • status changed from new to closed
  • resolution set to fixed

in w/ r3998

Changed 6 years ago by pgiraud

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 6 years ago by pgiraud

tests miss getBounds() call so have no interest

Changed 6 years ago by pgiraud

  • keywords review added

I agree with Tim to say that the bounds var is not use any more. Though the getBounds() call is mandatory.

Changed 6 years ago by tschaub

  • keywords review removed
  • status changed from reopened to closed
  • resolution set to fixed

Thanks again - I apologize for not fully understanding this before making edits.

Note: See TracTickets for help on using tickets.