Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonflatval-cognite committed Aug 1, 2023
1 parent c025a1e commit 9ec8db5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions react-components/stories/HighlightNode.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,12 @@ const StoryContent = ({
resources: AddResourceOptions[];
fdmAssetMappingConfig: FdmAssetMappingsConfig;
}) => {
const viewer = useReveal();

const [nodeData, setNodeData] = useState<any>();

const callback = (nodeData: NodeDataResult<any>) => {
setNodeData(nodeData.data);

if (!(viewer.models[0] instanceof CogniteCadModel)) return;

viewer.models[0].assignStyledNodeCollection(
nodeData.model.assignStyledNodeCollection(
new TreeIndexNodeCollection([nodeData.cadNode.treeIndex]),
DefaultNodeAppearance.Highlighted
);
Expand Down

0 comments on commit 9ec8db5

Please sign in to comment.