File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 20
20
},
21
21
"homepage" : " https://github.com/gtt-project/redmine_gtt#readme" ,
22
22
"dependencies" : {
23
+ "@juggle/resize-observer" : " ^3.3.1" ,
23
24
"font-awesome" : " ^4.7.0" ,
24
25
"ol" : " ^6.5.0" ,
25
26
"ol-ext" : " ^3.2.3"
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ import TextButton from 'ol-ext/control/TextButton'
33
33
import LayerPopup from 'ol-ext/control/LayerPopup'
34
34
import Popup from 'ol-ext/overlay/Popup'
35
35
import { position } from 'ol-ext/control/control'
36
- import GeometryType from 'ol/geom/GeometryType' ;
36
+ import GeometryType from 'ol/geom/GeometryType'
37
+ import { ResizeObserver } from '@juggle/resize-observer'
37
38
38
39
interface GttClientOption {
39
40
target : HTMLDivElement | null
@@ -265,11 +266,12 @@ export class GttClient {
265
266
}
266
267
267
268
// Sidebar hack
268
- document . querySelector ( '#sidebar' ) . addEventListener ( 'hideSidebar' , _ => {
269
+ const resizeObserver = new ResizeObserver ( ( entries , observer ) => {
269
270
this . maps . forEach ( m => {
270
271
m . updateSize ( )
271
272
} )
272
273
} )
274
+ resizeObserver . observe ( this . map . getTargetElement ( ) )
273
275
274
276
// When one or more issues is selected, zoom to selected map features
275
277
document . querySelectorAll ( 'table.issues tbody tr' ) . forEach ( ( element : HTMLTableRowElement ) => {
Original file line number Diff line number Diff line change 14
14
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752"
15
15
integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==
16
16
17
+ " @juggle/resize-observer@^3.3.1 " :
18
+ version "3.3.1"
19
+ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.3.1.tgz#b50a781709c81e10701004214340f25475a171a0"
20
+ integrity sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==
21
+
17
22
" @mapbox/jsonlint-lines-primitives@~2.0.2 " :
18
23
version "2.0.2"
19
24
resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234"
You can’t perform that action at this time.
0 commit comments