- removed console.log
- fixed issue for more extensive check into tags to be more accurate
This commit is contained in:
@@ -53,7 +53,7 @@ const RegionSelector = ({
|
||||
const getMagnificationLevel = () => {
|
||||
const test = socket.data;
|
||||
if (!socket.data) return null;
|
||||
|
||||
console.log(test);
|
||||
if (!test || !test.magnificationLevel) return "1x";
|
||||
return test?.magnificationLevel;
|
||||
};
|
||||
@@ -108,12 +108,12 @@ const RegionSelector = ({
|
||||
|
||||
const handleSaveclick = () => {
|
||||
const regions: ColourData[] = [];
|
||||
const test = Array.from(paintedCells.entries());
|
||||
const region1 = test.filter(([, cell]) => cell.region.name === "Bay 1");
|
||||
const region2 = test.filter(([, cell]) => cell.region.name === "Bay 2");
|
||||
const region3 = test.filter(([, cell]) => cell.region.name === "Bay 3");
|
||||
const region4 = test.filter(([, cell]) => cell.region.name === "Bay 4");
|
||||
const region5 = test.filter(([, cell]) => cell.region.name === "Bay 5");
|
||||
const paintedCellsArray = Array.from(paintedCells.entries());
|
||||
const region1 = paintedCellsArray.filter(([, cell]) => cell.region.name === "Bay 1");
|
||||
const region2 = paintedCellsArray.filter(([, cell]) => cell.region.name === "Bay 2");
|
||||
const region3 = paintedCellsArray.filter(([, cell]) => cell.region.name === "Bay 3");
|
||||
const region4 = paintedCellsArray.filter(([, cell]) => cell.region.name === "Bay 4");
|
||||
const region5 = paintedCellsArray.filter(([, cell]) => cell.region.name === "Bay 5");
|
||||
const region1Data = {
|
||||
id: 1,
|
||||
cells: region1.map(([key]) => [parseInt(key.split("-")[1]), parseInt(key.split("-")[0])]),
|
||||
|
||||
Reference in New Issue
Block a user