Skip to content

Commit

Permalink
Merge pull request #727 from biigle/point-splitting-bug
Browse files Browse the repository at this point in the history
Update annotations by using old features
  • Loading branch information
mzur authored Jan 17, 2024
2 parents e2b53e0 + 8bc7131 commit 5099077
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,9 @@ export default {
refreshSingleAnnotation(annotation) {
let source = this.annotationSource;
let newFeature = this.createFeature(annotation);
let oldFeature = source.getFeatureById(annotation.id)
source.removeFeature(oldFeature);
source.addFeature(newFeature);
let feature = source.getFeatureById(annotation.id);
feature.set('color', annotation.labels[0].label.color);
},
createFeature(annotation) {
let feature = new Feature(this.getGeometryFromPoints(annotation.shape, annotation.points[0]));
Expand Down

0 comments on commit 5099077

Please sign in to comment.