#68 closed defect (fixed)
Resizing bigmap; missing px units
Reported by: | rjwalker | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | v2.4.0 RC2 |
Component: | Web Map Viewer | Version: | v2.2.0 Final |
Keywords: | Cc: |
Description
When the map viewer (bigmap) is resized, the width and height attributes are updated, but not correctly - the units (px) are not included. I've not seen a problem with "out-of-the-box" GN, but in my own local use of this code, there is a problem in Firefox 2 - the map doesn't resize correctly. Adding 'px' to the end of the sizes fixed the problem.
Although the current code does work "out-of-the-box" on IE and Firefox, I recommend applying the patch anyway because:
- The current code is simply wrong - CSS requires the units to be specified (the only exception being when the magnitude is zero).
- The current code doesn't match the rest of the JavaScript, which correctly appends "px" when changing width and height attributes.
Attachments (1)
Change History (5)
by , 17 years ago
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Further investigation:
A while back I added a DOCTYPE declaration to the HTML generated by my local installation. It seems that this is the cause - it puts the browser into "strict" mode, where units must be supplied to lengths. Without the DOCTYPE, the browser is in "quirks" mode, where it supplies "px" if the units are missing.
See http://www.quirksmode.org/css/quirksmode.html for details.
Because GN currently does not include DOCTYPEs "out-of-the-box", it seems the problem would not normally occur. (But the JS code is still wrong.)
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
+ "px" has been added in the two files
comment:4 by , 16 years ago
Milestone: | → v2.4.0 RC2 |
---|
im_markers.js is also affected by the same problem. Patch included below.