Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});
},
rewriteProxyIds(state, idMapping) {
state.measurements = remapIdKeys(state.measurements, idMapping);
state.imageToLabelmaps = remapIdKeys(state.imageToLabelmaps, idMapping);
state.labelmapStates = remapIdKeys(state.labelmapStates, idMapping);
Object.keys(state.imageToLabelmaps).forEach((id) => {
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});
state.labelmapStates = remapIdKeys(state.labelmapStates, idMapping);
Object.keys(state.imageToLabelmaps).forEach((id) => {
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});
rewriteProxyIds(state, idMapping) {
state.measurements = remapIdKeys(state.measurements, idMapping);
state.imageToLabelmaps = remapIdKeys(state.imageToLabelmaps, idMapping);
state.labelmapStates = remapIdKeys(state.labelmapStates, idMapping);
Object.keys(state.imageToLabelmaps).forEach((id) => {
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});
state.imageToLabelmaps = remapIdKeys(state.imageToLabelmaps, idMapping);
state.labelmapStates = remapIdKeys(state.labelmapStates, idMapping);
Object.keys(state.imageToLabelmaps).forEach((id) => {
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});
state.measurements = remapIdKeys(state.measurements, idMapping);
state.imageToLabelmaps = remapIdKeys(state.imageToLabelmaps, idMapping);
state.labelmapStates = remapIdKeys(state.labelmapStates, idMapping);
Object.keys(state.imageToLabelmaps).forEach((id) => {
state.imageToLabelmaps[id] = remapIdList(
state.imageToLabelmaps[id],
idMapping
);
});
},
},
actions: {
addLabelmapToImage: wrapMutationAsAction('addLabelmapToImage'),
setLabelmapState: wrapMutationAsAction('setLabelmapState'),
addMeasurementTool: wrapMutationAsAction('addMeasurementTool'),
removeMeasurementTool: wrapMutationAsAction('removeMeasurementTool'),
updateMeasurementTool: wrapMutationAsAction('updateMeasurementTool'),
rewriteProxyIds: {
root: true,
handler: wrapMutationAsAction('rewriteProxyIds'),
},
},
});