Skip to content

Commit

Permalink
chore: disable edges checkbox (#1192)
Browse files Browse the repository at this point in the history
* chore: remove edges checkbox

* feat: make the edges rendering a feature
  • Loading branch information
VmMad authored Feb 27, 2024
1 parent 0876eb9 commit 9a0f92e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions client/src/features/visualizer-threejs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ export const features = {
statsEnabled: false,
cameraControls: true,
controlsVisualiserEnabled: true,
showEdgeRenderingCheckbox: false,
};
26 changes: 14 additions & 12 deletions client/src/features/visualizer-threejs/wrapper/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SelectedFeedInfo } from "./SelectedFeedInfo";
import ConfigControls from "../ConfigControls";
import useSearchStore from "~features/visualizer-threejs/store/search";
import { useTangleStore } from "~features/visualizer-threejs/store/tangle";
import { SEARCH_RESULT_COLOR } from "~features/visualizer-threejs/constants";
import { SEARCH_RESULT_COLOR, features } from "~features/visualizer-threejs/constants";
import { isSearchMatch } from "~features/visualizer-threejs/hooks/useSearch";

export const Wrapper = ({
Expand Down Expand Up @@ -105,17 +105,19 @@ export const Wrapper = ({
)}
</button>
</div>
{isEdgeRenderingEnabled !== undefined && setEdgeRenderingEnabled !== undefined && (
<div className="margin-l-t row middle">
<h3>Show edges:</h3>
<input
type="checkbox"
className="margin-l-t"
checked={isEdgeRenderingEnabled}
onChange={({ target: { checked } }) => setEdgeRenderingEnabled(checked)}
/>
</div>
)}
{features.showEdgeRenderingCheckbox &&
isEdgeRenderingEnabled !== undefined &&
setEdgeRenderingEnabled !== undefined && (
<div className="margin-l-t row middle">
<h3>Show edges:</h3>
<input
type="checkbox"
className="margin-l-t"
checked={isEdgeRenderingEnabled}
onChange={({ target: { checked } }) => setEdgeRenderingEnabled(checked)}
/>
</div>
)}
</div>
</div>
{selectedFeedItem && (
Expand Down

0 comments on commit 9a0f92e

Please sign in to comment.