Skip to content

Commit

Permalink
update: hide movie link only
Browse files Browse the repository at this point in the history
  • Loading branch information
scott306lr committed Jan 13, 2023
1 parent 74de148 commit 26e937d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions movis/src/pages/relation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ const MyMovieGraph: React.FC<{
enableNodeDrag={false}
graphData={graph}
nodeLabel="name"
nodeVisibility={(node: NodeObject) => assignBoolean(node?.id, toHide)}
nodeVisibility={(node: NodeObject) =>
assignBoolean(node?.id, toHide) || nameComp(node?.id, "Movie")
}
nodeColor={(node: NodeObject) => assignColor(node?.id)}
// nodeCanvasObjectMode={() => "after"}
nodeThreeObjectExtend={true}
Expand Down Expand Up @@ -506,7 +508,7 @@ const MyMovieGraph: React.FC<{
className="flex w-full flex-col items-center space-x-5 rounded-2xl bg-white/30 px-5 py-3 text-center align-middle hover:bg-white/70"
onClick={() => toggleIdx(0, setToHide)}
>
<h1>{toHide[0] ? "Show Movie Nodes" : "Hide Movie Nodes"}</h1>
<h1>{toHide[0] ? "Show Movie Links" : "Hide Movie Links"}</h1>
</button>
</div>
</div>
Expand Down

0 comments on commit 26e937d

Please sign in to comment.