Skip to content

Commit 0fddb32

Browse files
AkctarusSharglutDev
andcommitted
front: fix track length onClickMap
Co-authored-by: Paul Filimon <[email protected]>
1 parent f1e5b8b commit 0fddb32

File tree

1 file changed

+2
-1
lines changed
  • front/src/common/IntervalsDataViz

1 file changed

+2
-1
lines changed

front/src/common/IntervalsDataViz/data.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ export function entityDoUpdate<T extends EditorEntity>(entity: T, sourceLine: Li
676676
}
677677
});
678678
// eslint-disable-next-line dot-notation
679-
newProps['length'] = getLineStringDistance(entity.geometry as LineString);
679+
if (entity.properties.length === 0)
680+
newProps.length = getLineStringDistance(entity.geometry as LineString);
680681

681682
return { ...entity, properties: newProps };
682683
}

0 commit comments

Comments
 (0)