Ticket #2188 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Case-Sensitivity-Bug in class PanZoomBar causes problems changing zoombar style (and more)

Reported by: Gerardo Owned by: crschmidt
Priority: minor Milestone: 2.9 Release
Component: Control.PanZoomBar Version: 2.8
Keywords: Cc: g-a-d@…
State: Complete

Description

Case Sensitivity Bug in OpenLayers.Control.PanZoomBar

Property zoomBarDiv in class PanZoomBar is mainly referenced as zoombarDiv inside the class. Therefore zoomBarDiv will never be initialized.

Consequently you get an zoomBarDiv is null error if you want to use that property outside the class.

Platform, OS

Every.

Detailed steps …

I ran across that problem wanting to change the zoombar style. (You can see exactly what happens at the following link, where I try to change the background color of the zoombar.)

Link to code

 http://yes.ihatemyself.de/ol/

Planned solution

Use the patch I attached. ;-)

Attachments

PanZoomBarCaseSensitivitiyBug.patch Download (1.8 KB) - added by Gerardo 4 years ago.
Patch to kill the Case-Sensitivity-Bug!

Change History

Changed 4 years ago by Gerardo

Patch to kill the Case-Sensitivity-Bug!

Changed 3 years ago by bartvde

  • keywords zoombar, zoomBarDiv removed
  • status changed from new to closed
  • state changed from Review to Complete
  • resolution set to fixed

(In [10105]) change property zoomBarDiv to zoombarDiv to match the actual code in PanZoomBar, reported by Gerardo, non-functional change (closes #2188)

Changed 3 years ago by bartvde

Gerardo, I chose to take a different approach, i.e. to rename the property to zoombarDiv and to change the docs. Your patch kills for instance a test case, and it is likely other people will already be using zoombarDiv instead of zoomBarDiv, so I did not want to make this change to avoid breakage. Thanks for the report!

Note: See TracTickets for help on using tickets.