Skip to content

Commit

Permalink
Improve CircleSpatialInputAction
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasstein committed Jan 14, 2025
1 parent 22fe9a2 commit cead68f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import CancelablePromise from "apprt-core/CancelablePromise";
import Circle from "esri/geometry/Circle";
import {difference} from "esri/geometry/geometryEngine";
import { difference } from "esri/geometry/geometryEngine";
import CircleSpatialInputWidget from "../widgets/CircleSpatialInputWidget.vue";
import Vue from "apprt-vue/Vue";
import VueDijit from "apprt-vue/VueDijit";
Expand Down Expand Up @@ -98,6 +98,8 @@ export default class CircleSpatialInputAction {
}

disable() {
this.#scaleWatcher.remove();
this.#scaleWatcher = undefined;
this.closeWidget();
this.removeGraphicFromView();
}
Expand All @@ -115,7 +117,7 @@ export default class CircleSpatialInputAction {
clickHandle.remove();
// prevent popup
evt.stopPropagation();
const point = view.toMap({x: evt.x, y: evt.y});
const point = view.toMap({ x: evt.x, y: evt.y });
const circleGeometry = this.createDonutOrCircle(point);
if (args?.queryBuilderSelection) {
this.closeWidget();
Expand Down Expand Up @@ -204,7 +206,8 @@ export default class CircleSpatialInputAction {
() => [view.scale], ([scale]) => {
const adjustedStepSize = this._adjustStepSize(scale, model);
vm.stepSize = adjustedStepSize.stepSize;
}, {
},
{
initial: true
}
);
Expand Down

0 comments on commit cead68f

Please sign in to comment.