From 7102492c1ca35d66fd876685b7a80ed2615b3da9 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 9 Apr 2024 14:37:13 +0200 Subject: [PATCH] fix: add part number to segment --- package-lock.json | 4 ++-- package.json | 2 +- src/interaction/TrackManager.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91854ed..956fad1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@geoblocks/edittrack", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@geoblocks/edittrack", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.8", "license": "BSD-3-Clause", "devDependencies": { "@geoblocks/elevation-profile": "0.0.19", diff --git a/package.json b/package.json index 15c2882..390e5ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@geoblocks/edittrack", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.8", "description": "Geoblocks edittrack", "scripts": { "eslint": "eslint src test demos", diff --git a/src/interaction/TrackManager.ts b/src/interaction/TrackManager.ts index 8420ba2..8d81ff9 100644 --- a/src/interaction/TrackManager.ts +++ b/src/interaction/TrackManager.ts @@ -241,7 +241,6 @@ export default class TrackManager { this.onTrackChanged_(); } else { // control point - // FIXME multi lines: check this const {deleted, pointBefore, pointAfter, newSegment} = this.trackData_.deleteControlPoint(selected); // remove deleted features from source @@ -249,6 +248,7 @@ export default class TrackManager { // add newly created segment to source if (newSegment) { + newSegment.set('part', this.trackData_.part); this.source_.addFeature(newSegment); }