Skip to content

Commit

Permalink
CELE-116 Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvcorreia committed Dec 17, 2024
1 parent aa03594 commit 336c7ef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
import { Box, FormControlLabel, Stack, Tooltip, Typography } from "@mui/material";
import { vars } from "../../../theme/variables.ts"; // Adjust the import path as needed
import CustomSwitch from "../../ViewerContainer/CustomSwitch.tsx";
import { vars } from "./../theme/variables.ts"; // Adjust the import path as needed
import CustomSwitch from "./ViewerContainer/CustomSwitch.tsx";

interface CustomFormControlLabel {
label: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ function synapsesStyle(feature: FeatureLike, workspace: Workspace): Style {
type LayerSelector = [VectorLayer<Feature> | undefined, (feature: Feature, next: () => void) => void];

function selectAcrossLayers(position: Coordinate, ...selectors: LayerSelector[]) {
for (let i = 0; i < selectors.length; i++) {
const [layer, handler] = selectors[i];
for (const [layer, handler] of selectors) {
const source = layer?.getSource();
const features = source?.getFeaturesAtCoordinate(position);
if (!features || features.length === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ZoomOutIcon from "@mui/icons-material/ZoomOut";
import { Box, Divider, IconButton, Popover, Typography } from "@mui/material";
import Tooltip from "@mui/material/Tooltip";
import { useState } from "react";
import CustomFormControlLabel from "../ThreeD/CustomFormControlLabel";
import CustomFormControlLabel from "../../CustomFormControlLabel";
import { vars } from "../../../theme/variables.ts";

const { gray500 } = vars;
Expand Down Expand Up @@ -41,8 +41,7 @@ function SceneControls({ onZoomIn, onResetView, onZoomOut, onPrint, layers }: Sc
setAnchorEl(null);
};

const layersControlsElems = Object.keys(layers).map((key) => {
const { label, checked, onToggle } = layers[key as keyof LayersControlsHandlers];
const layersControlsElems = Object.entries(layers).map(([key, { label, checked, onToggle }]) => {
return (
<CustomFormControlLabel
key={key}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useEffect, useRef, useState } from "react";
import { useSelectedWorkspace } from "../../../hooks/useSelectedWorkspace.ts";
import { DARK_SCENE_BACKGROUND, LIGHT_SCENE_BACKGROUND } from "../../../settings/threeDSettings.ts";
import { vars } from "../../../theme/variables.ts";
import CustomFormControlLabel from "./CustomFormControlLabel.tsx";
import CustomFormControlLabel from "../../CustomFormControlLabel.tsx";
import { Recorder } from "./Recorder.ts";

import { useGlobalContext } from "../../../contexts/GlobalContext.tsx";
Expand Down

0 comments on commit 336c7ef

Please sign in to comment.