Skip to content

Commit

Permalink
Fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Austerschulte committed Jun 14, 2024
1 parent 89a2ea0 commit 75fad00
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/main/js/bundles/dn_screenshot/ScreenshotControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class ScreenshotControl {
quality: screenshotModel.quality,
area: screenshotModel.area,
ignoreBackground: screenshotModel.ignoreBackground
}
};
const view = this._mapWidgetModel.view;
view.takeScreenshot(options).then((screenshot) => {
const link = document.createElement('a');
Expand All @@ -79,7 +79,7 @@ export default class ScreenshotControl {
drawArea(area) {
this.canvas = this._mapWidgetModel.view.container;
const element = document.createElement('div');
element.className = 'screenshot_rectangle'
element.className = 'screenshot_rectangle';
element.style.left = area.x + 'px';
element.style.top = area.y + 'px';
element.style.width = area.width + 'px';
Expand Down Expand Up @@ -125,7 +125,7 @@ export default class ScreenshotControl {
y: screenPoint1.y,
width: width,
height: height
}
};
}


Expand Down
23 changes: 15 additions & 8 deletions src/main/js/bundles/dn_screenshot/ScreenshotUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
<div class="screenshot-settings-div ct-flex-item pa-2">
<v-layout
row
wrap>
wrap
>
<v-flex
md12
pb-2>
pb-2
>
<h4>{{ i18n.areaTitle }}</h4>
<v-btn
v-if="!area"
Expand Down Expand Up @@ -56,11 +58,14 @@
:value="true"
type="info"
dismissible
>{{ i18n.alerts.noArea }}</v-alert>
>
{{ i18n.alerts.noArea }}
</v-alert>
</v-flex>
<v-flex
md12
pb-2>
pb-2
>
<h4>{{ i18n.fileFormat }}</h4>
<v-radio-group
v-model="format"
Expand All @@ -80,7 +85,8 @@
<v-flex
v-show="format==='jpg'"
md12
pb-2>
pb-2
>
<h4>{{ i18n.quality }}</h4>
<v-slider
v-model="quality"
Expand All @@ -94,7 +100,8 @@
</v-flex>
<v-flex
md12
pb-2>
pb-2
>
<h4 v-if="selectedBasemapId === undefined">
{{ i18n.backgroundTitle }}
</h4>
Expand All @@ -109,7 +116,7 @@
</v-flex>
</v-layout>
</div>
<v-divider/>
<v-divider />
<div class="ct-flex-item ct-flex-item--no-grow ct-flex-item--no-shrink pt-3">
<v-btn
color="primary"
Expand Down Expand Up @@ -162,5 +169,5 @@
possibleFormats: ["png", "jpg"]
};
}
}
};
</script>
4 changes: 2 additions & 2 deletions src/main/js/bundles/dn_screenshot/ScreenshotUIFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ export default class ScreenshotUIFactory {
vm.$on("take-screenshot", () => {
this._screenshotControl.takeScreenshot();
});
}
};

widget.disableBinding = () => {
this._screenshotControl.stopDrawing();
this._screenshotControl.deleteArea();
propertiesToViewBinding?.disable();
basemapToViewBinding?.disable();
vm.$off();
}
};

// clean up binding and attached functions
widget.own({
Expand Down

0 comments on commit 75fad00

Please sign in to comment.