From 679d6dc7a1c8c71392fd140551037eff2e8fc13c Mon Sep 17 00:00:00 2001 From: filipc96 <56372098+filipc96@users.noreply.github.com> Date: Fri, 19 Jan 2024 00:14:51 +0100 Subject: [PATCH] Fixes to geoengine_renderer.esm.js --- .../geoengine_renderer/geoengine_renderer.esm.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js b/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js index b441feea05..58070075a3 100644 --- a/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js +++ b/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js @@ -10,12 +10,11 @@ import {LayersPanel} from "../layers_panel/layers_panel.esm"; import {RecordsPanel} from "../records_panel/records_panel.esm"; import {rasterLayersStore} from "../../../raster_layers_store.esm"; import {vectorLayersStore} from "../../../vector_layers_store.esm"; -import {useService} from "@web/core/utils/hooks"; +import {useService, useOwnedDialogs} from "@web/core/utils/hooks"; import {registry} from "@web/core/registry"; import {RelationalModel} from "@web/views/relational_model"; import {evaluateExpr} from "@web/core/py_js/py"; -import { useOwnedDialogs } from "@web/core/utils/hooks"; import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; import { FormViewDialog } from "@web/views/view_dialogs/form_view_dialog"; @@ -592,7 +591,7 @@ export class GeoengineRenderer extends Component { } } else { this.overlay.setVisible(false); - body = "No geometry. Would you like to add geometry?"; + const body = "No geometry. Would you like to add geometry?"; this.openConformationDialog(body, () => this.openEditRecord(record)); } } @@ -617,7 +616,9 @@ export class GeoengineRenderer extends Component { const conformationDialogProps = { body: this.env._t(body), confirm: callback, - cancel: () => {}, + cancel: () => { + return; + }, }; this.addDialog(ConfirmationDialog, conformationDialogProps); @@ -1295,4 +1296,4 @@ GeoengineRenderer.props = { createRecord: {type: Function}, onDrawStart: {type: Function}, }; -GeoengineRenderer.components = {LayersPanel, GeoengineRecord, RecordsPanel}; \ No newline at end of file +GeoengineRenderer.components = {LayersPanel, GeoengineRecord, RecordsPanel};