Skip to content

Commit

Permalink
Remove workarounds in attribute table to adjust the map size. This is…
Browse files Browse the repository at this point in the history
… now handled internally by the map component.
  • Loading branch information
fschmenger committed Mar 14, 2023
1 parent 0757d94 commit 3d71163
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/components/attributeTable/AttributeTableWin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:moduleName="moduleName"
class="wgu-attributetable-win"
:icon="icon"
v-on:visibility-change="show">
>

<template v-slot:wgu-win-toolbar>
<v-select
Expand All @@ -29,7 +29,6 @@

<wgu-attributetable
v-if="selLayer"
v-resize="onResize"
:layerId="selLayer.get('lid')"
:syncTableMapSelection="syncTableMapSelection"
>
Expand Down Expand Up @@ -65,29 +64,6 @@ export default {
'wgu-attributetable': AttributeTable
},
methods: {
show () {
// resize map properly after closing
// the AttributeTable
this.resizeOlMap()
},
onResize () {
// change map size when window is changing
this.resizeOlMap()
},
/**
* Update the OpenLayers map size.
*
* Necessary because the map does not automatically
* notice when its size is changed externally.
*/
resizeOlMap () {
this.$nextTick(() => {
// must be within '$nextTick' to take effect
this.map.updateSize();
})
},
/**
* This function is executed, after the map is bound (see mixins/Mapable).
* Bind to the layers from the OpenLayers map.
Expand Down

0 comments on commit 3d71163

Please sign in to comment.