Skip to content

Commit

Permalink
fix: add part number to segment
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Apr 22, 2024
1 parent dbf73b9 commit 4a96b6b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@geoblocks/edittrack",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.7",
"description": "Geoblocks edittrack",
"scripts": {
"eslint": "eslint src test demos",
Expand Down
2 changes: 1 addition & 1 deletion src/interaction/TrackManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ export default class TrackManager<POIMeta> {
this.onTrackChanged_();
} else {
// control point
// FIXME multi lines: check this
const {deleted, pointBefore, pointAfter, newSegment} = this.trackData_.deleteControlPoint(selected);

// remove deleted features from source
deleted.forEach(f => this.source_.removeFeature(f));

// add newly created segment to source
if (newSegment) {
newSegment.set('part', this.trackData_.part);
this.source_.addFeature(newSegment);
}

Expand Down

0 comments on commit 4a96b6b

Please sign in to comment.