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 11, 2024
1 parent 6f0d74f commit ee7932f
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.5",
"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 ee7932f

Please sign in to comment.