Skip to content

Commit

Permalink
PB-1213: make selectedLineFeature a ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Jan 7, 2025
1 parent e9deb14 commit 6657896
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/drawing/components/DrawingInteractions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const store = useStore()
const currentDrawingMode = computed(() => store.state.drawing.mode)
const editMode = computed(() => store.state.drawing.editingMode)
let selectedLineFeature = null
const selectedLineFeature = ref(null)
const specializedInteractionComponent = computed(() => {
let selectedInteraction = null
Expand All @@ -39,10 +39,10 @@ const specializedInteractionComponent = computed(() => {
}
if (editMode.value === EditMode.EXTEND) {
const isMeasure =
selectedLineFeature?.get('editableFeature')?.featureType ===
selectedLineFeature.value?.get('editableFeature')?.featureType ===
EditableFeatureTypes.MEASURE
const isLine =
selectedLineFeature?.get('editableFeature')?.featureType ===
selectedLineFeature.value?.get('editableFeature')?.featureType ===
EditableFeatureTypes.LINEPOLYGON
if (isMeasure) {
selectedInteraction = ExtendMeasureInteraction
Expand Down Expand Up @@ -74,9 +74,9 @@ function removeLastPoint() {
function featureSelected(feature) {
if (feature.getGeometry().getType() === 'LineString') {
selectedLineFeature = feature
selectedLineFeature.value = feature
} else {
selectedLineFeature = null
selectedLineFeature.value = null
}
}
defineExpose({
Expand Down

0 comments on commit 6657896

Please # to comment.