@regionerne/gis-komponent 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3334,11 +3334,11 @@ class ToolboxComponent {
|
|
|
3334
3334
|
startDraw() {
|
|
3335
3335
|
this.activeMode = 'draw';
|
|
3336
3336
|
// Set the first item as default
|
|
3337
|
-
if (!this.selectedDrawItem) {
|
|
3337
|
+
if (!this.selectedDrawItem && this.drawItems && this.drawItems.length > 0) {
|
|
3338
3338
|
this.selectedDrawItem = this.drawItems[0];
|
|
3339
|
+
// Actually start drawing immediately
|
|
3340
|
+
this._doStartDraw(this.selectedDrawItem);
|
|
3339
3341
|
}
|
|
3340
|
-
// Actually start drawing immediately
|
|
3341
|
-
this._doStartDraw(this.selectedDrawItem);
|
|
3342
3342
|
}
|
|
3343
3343
|
_deleteSelect;
|
|
3344
3344
|
get deleteSelect() {
|
|
@@ -3970,6 +3970,12 @@ class ToolboxComponent {
|
|
|
3970
3970
|
setNewMapDimensions() {
|
|
3971
3971
|
this.map.getTargetElement().style.width = this.mapWidth + 'px';
|
|
3972
3972
|
this.map.getTargetElement().style.height = this.mapHeight + 'px';
|
|
3973
|
+
if (this.mapWidth < 1920 && this.profile.toolboxInitialPosition.includes('højre')) {
|
|
3974
|
+
const offset = this.mapWidth <= 800 ? 80 : (this.mapWidth <= 1280 ? 40 :
|
|
3975
|
+
(this.mapWidth <= 1680 ? 20 : 0));
|
|
3976
|
+
//Map got smaller, push Toolbox to the left
|
|
3977
|
+
this._layoutService.bringElementIntoViewIfNeeded('.toolbox-wrapper', -offset, this.collapsed);
|
|
3978
|
+
}
|
|
3973
3979
|
this.map.updateSize();
|
|
3974
3980
|
}
|
|
3975
3981
|
doPrint() {
|