-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into hflatval/observation-creation
- Loading branch information
Showing
21 changed files
with
166 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
react-components/src/components/CadModelContainer/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*! | ||
* Copyright 2024 Cognite AS | ||
*/ | ||
import { type IndexSet, type NodeAppearance } from '@cognite/reveal'; | ||
|
||
export type NodeStylingGroup = { | ||
nodeIds: number[]; | ||
style?: NodeAppearance; | ||
}; | ||
|
||
export type TreeIndexStylingGroup = { | ||
treeIndexSet: IndexSet; | ||
style?: NodeAppearance; | ||
}; | ||
|
||
export type CadStylingGroup = NodeStylingGroup | TreeIndexStylingGroup; | ||
|
||
export type CadModelStyling = { | ||
defaultStyle?: NodeAppearance; | ||
groups?: CadStylingGroup[]; | ||
}; | ||
|
||
export function isNodeStylingGroup( | ||
stylingGroup: CadStylingGroup | ||
): stylingGroup is NodeStylingGroup { | ||
return 'nodeIds' in stylingGroup; | ||
} | ||
|
||
export function isTreeIndexStylingGroup( | ||
stylingGroup: CadStylingGroup | ||
): stylingGroup is TreeIndexStylingGroup { | ||
return 'treeIndexSet' in stylingGroup; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.