Skip to content

Commit

Permalink
Merge branch 'master' into renovate/all-minor-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonflatval-cognite authored Jun 25, 2024
2 parents 174eed1 + 4187203 commit 6799207
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
1 change: 0 additions & 1 deletion documentation/docs/components/LiveCodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function transformCode(code: string): string {
}
if (viewer) {
resetViewerEventHandlers(viewer);
if (model instanceof CogniteCadModel) {
resetCogniteCadModel(model);
}
Expand Down
12 changes: 0 additions & 12 deletions documentation/docs/utils/viewerUtilities.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
import {
CogniteCadModel,
Cognite3DViewer,
DefaultNodeAppearance,
} from '@cognite/reveal';

/**
* Resets all event handlers on the viewer provided. This uses
* internal functionality and actual applications needs to implement
* this to better approaches than this.
*/
export function resetViewerEventHandlers(viewer: Cognite3DViewer): void {
const eventListeners = (viewer as any)._events;
eventListeners.cameraChange.unsubscribeAll();
eventListeners.click.unsubscribeAll();
eventListeners.hover.unsubscribeAll();
}

/**
* Resets state of model to the default state (i.e. appearance and styled sets)
Expand Down
2 changes: 1 addition & 1 deletion documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@types/react": "18.3.3",
"copyfiles": "2.4.1",
"docusaurus-plugin-typedoc": "0.22.0",
"docusaurus-plugin-typedoc": "1.0.1",
"replace": "1.2.2",
"rimraf": "5.0.7",
"typedoc": "0.26.0",
Expand Down
13 changes: 6 additions & 7 deletions documentation/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6799207

Please sign in to comment.