Commit a5e8f9d
committed
Prevent invalid overview resizing.
If the overview panel is collapsed and is asked to rerender, the map
ended up being 512 pixels wide. There were two separate effects that
could result in this behavior. When a new analysis task is loaded, the
overview panel has the tile source updated, even though it didn't
change. Any such update resulted in recreating the map unnecessarily.
When the map was created, if the div for the map was not visible due to
being collapsed, it has a zero width. geojs defaults to 512 pixels wide
in this case. Further, if the div changed size without the window
changing size, that map was not updated appropriately (for instance,
when the scroll bar appears or disappears). Use a ResizeObserver, if
available, to adjust the map when either condition occurs.1 parent a0d418f commit a5e8f9d
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
0 commit comments