Skip to content

Commit

Permalink
fix: rename start drawing & end drawing & format
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Behairi committed Oct 18, 2024
1 parent 69f8724 commit 717439b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion elements/drawtools/src/components/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class EOxDrawToolsList extends LitElement {
${this.drawnFeatures.map((feature, i) => {
// Determine feature number and ID
const featureNumber = i + 1;
const featureId = feature.getId()
const featureId = feature.getId();
// Check if the feature is hovered or clicked
const isFeatureHovered = this.hoverId === featureId;
Expand Down
8 changes: 4 additions & 4 deletions elements/drawtools/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ export class EOxDrawTools extends LitElement {
/**
* @onClick Event handler triggered to start drawing on the map.
*/
handleStartDrawing() {
startDrawing() {
startDrawingMethod(this);
}

/**
* @onClick Event handler triggered to discard/stop drawing
* on the map and delete the drawn shapes.
*/
handleDiscardDrawing() {
discardDrawing() {
discardDrawingMethod(this);
}

Expand Down Expand Up @@ -296,8 +296,8 @@ export class EOxDrawTools extends LitElement {
<!-- Controller Component -->
<eox-drawtools-controller
.drawFunc=${{
start: () => this.handleStartDrawing(),
discard: () => this.handleDiscardDrawing(),
start: () => this.startDrawing(),
discard: () => this.discardDrawing(),
editor: (/** @type {{ target: { value: string; }; }} */ evt) =>
this.handleFeatureChange(evt.target.value, true),
import: (/** @type {DragEvent | Event} */ evt) =>
Expand Down
2 changes: 1 addition & 1 deletion elements/drawtools/src/methods/draw/init-layer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onDrawEndMethod,initSelection } from "./";
import { onDrawEndMethod, initSelection } from "./";

import { getElement } from "@eox/elements-utils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FIT_OPTIONS } from "../../enums";
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
*/
const selectAndDeselectFeature = (feature, EoxDrawToolList) => {
const selectedFeatureId = feature.getId()
const selectedFeatureId = feature.getId();
const { clickId, drawLayer, olMap, clickInteraction } = EoxDrawToolList;

const isSelectedFeature = clickId === selectedFeatureId;
Expand Down

0 comments on commit 717439b

Please sign in to comment.