Skip to content

Commit

Permalink
Merge branch 'normalize-points'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanh7 committed Feb 17, 2024
2 parents d515ce9 + 740300c commit 8158e4b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/src/routes/CameraMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default function CameraMasks({ camera }) {

document.body.removeChild(textarea);
}
}, [motionMaskPoints]);
}, [motionMaskPoints, height, width]);

const handleSaveMotionMasks = useCallback(async () => {
try {
Expand Down Expand Up @@ -205,7 +205,7 @@ ${Object.keys(zonePoints)

document.body.removeChild(textarea);
}
}, [zonePoints]);
}, [zonePoints, height, width]);

const handleSaveZones = useCallback(async () => {
try {
Expand All @@ -227,7 +227,7 @@ ${Object.keys(zonePoints)
setError(error.message);
}
}
}, [camera, zonePoints]);
}, [camera, zonePoints, height, width]);

// Object methods
const handleEditObjectMask = useCallback(
Expand Down Expand Up @@ -275,7 +275,7 @@ ${Object.keys(objectMaskPoints)
.map(
(objectName, index) =>
`cameras.${camera}.objects.filters.${objectName}.mask.${index}=${polylinePointsToPolyline(
objectMaskPoints[objectName], height, width
objectMaskPoints[objectName][index], height, width
)}`
)
.join('&');
Expand All @@ -291,7 +291,7 @@ ${Object.keys(objectMaskPoints)
setError(error.message);
}
}
}, [camera, objectMaskPoints]);
}, [camera, objectMaskPoints, height, width]);

const handleAddToObjectMask = useCallback(
(key) => {
Expand Down

0 comments on commit 8158e4b

Please sign in to comment.