Skip to content
Snippets Groups Projects
Commit 3743d456 authored by Moritz Langenstein's avatar Moritz Langenstein
Browse files

(ml5717) (ztw17) Pulled out Object.keys().length

parent 23659eeb
No related branches found
No related tags found
1 merge request!78(ml5717) (ztw17) Small frontend improvements
Pipeline #109570 passed
......@@ -193,12 +193,13 @@ export const splitOnPressures = ([...path]) => {
export const renderPath = (id, points, pathEraseIntervals) => {
let rectShapeStartIndex = -1
const pointsWithIntervals = Object.keys(pathEraseIntervals).length
// Rect recognition hint shape: pure rect with no erasure
if (Object.keys(pathEraseIntervals).length == 0 && points.length == 5) {
if (pointsWithIntervals == 0 && points.length == 5) {
rectShapeStartIndex = 0
// Recognised rect shape: rect after completely erased raw data
} else if (Object.keys(pathEraseIntervals).length > 0 && points.length > 5) {
} else if (pointsWithIntervals > 0 && points.length > 5) {
// Check that the preceding raw data is completely erased
for (let i = 0; i < points.length - 5; i++) {
if (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment