OpenLayers OpenLayers

Ticket #1593 (closed feature: fixed)

Opened 2 months ago

Last modified 1 month ago

Handler.Box displays an incorrectly sized box

Reported by: ahocevar Assigned to: crschmidt
Priority: critical Milestone: 2.7 Release
Component: Handler.Box Version: 2.6
Keywords: Cc:
State: Complete

Description

Depending on the used box model (include or exclude CSS borders in the width and height of an element), the corners of the displayed box will not match the cursor. The attached patch fixes that.

Attachments

1593-r7375-A0.patch (1.3 kB) - added by ahocevar on 06/18/08 06:19:27.
1593-r7626-A1.patch (2.6 kB) - added by ahocevar on 07/30/08 20:33:11.
as suggested with caching, and smarter detection if something needs to be done or not (by detection of standards compliant mode)
1593-r7647-A2.patch (2.6 kB) - added by ahocevar on 07/31/08 16:45:24.
additional comment, removed unused variable

Change History

06/18/08 06:19:27 changed by ahocevar

  • attachment 1593-r7375-A0.patch added.

07/18/08 14:43:15 changed by crschmidt

Should we cache the border size, instead of re-fetching it every time we change the box size? I think the likelihood that a cached value would change while the box was being drawn to be unlikely enough that it might be worth the performance gain to just always cache it... Or should we not bother?

07/28/08 15:07:27 changed by euzuro

  • owner set to ahocevar.

07/28/08 15:17:34 changed by euzuro

  • priority changed from minor to critical.

07/30/08 20:33:11 changed by ahocevar

  • attachment 1593-r7626-A1.patch added.

as suggested with caching, and smarter detection if something needs to be done or not (by detection of standards compliant mode)

07/30/08 20:33:42 changed by ahocevar

  • owner changed from ahocevar to crschmidt.

07/31/08 10:39:23 changed by crschmidt

Comments:

Line 184:

var dims = OpenLayers.Element.getDimensions(this.zoomBox);

Unused dims var? can we drop this?

Can we expand the comment on:

        // depending on the box model, modify width and height to take borders
        // of the box into account

Can we mention explicitly that newBoxModel is for "IE in non-compat mode" or whatever it actually is, to explain why we have to futz with it?

07/31/08 10:57:52 changed by crschmidt

  • state changed from Review to Needs More Work.

07/31/08 16:45:24 changed by ahocevar

  • attachment 1593-r7647-A2.patch added.

additional comment, removed unused variable

07/31/08 17:09:46 changed by ahocevar

  • state changed from Needs More Work to Review.

07/31/08 17:15:46 changed by crschmidt

  • state changed from Review to Commit.

07/31/08 17:24:14 changed by crschmidt

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