-
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.
(feat) Make example code for training and some changes in the archite…
…cture (#4543) * Initial commit * Some movements * Fix linter problems * Make the axis a tiny better * Comments only * Some rafactoring * Make it better * Update MeasurementTool.ts * Fix lint * Make better axis tick labels, but still not perfect * handleEscape better * Changes in RevealRenderTarget * Update RootDomainObject.ts * Fix smal bug * Moving code * Fix typo * Set new default value * Fix typo * Initial commit * Update Architecture.stories.tsx * Update yarn.lock * Fix MeasureLineView so lines are visible from long distance * Make a DefaultRevealConfig * Add override keyword * Remove some unneccesary code * Update ExampleTool.ts * Update react-components/stories/Architecture.stories.tsx Co-authored-by: Håkon Flatval <[email protected]> --------- Co-authored-by: Håkon Flatval <[email protected]>
- Loading branch information
1 parent
350a6a1
commit b639f68
Showing
27 changed files
with
817 additions
and
100 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
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
31 changes: 31 additions & 0 deletions
31
react-components/src/architecture/base/renderTarget/BaseRevealConfig.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,31 @@ | ||
/*! | ||
* Copyright 2024 Cognite AS | ||
*/ | ||
|
||
import { type AxisGizmoTool } from '@cognite/reveal/tools'; | ||
import { type BaseCommand } from '../commands/BaseCommand'; | ||
import { PopupStyle } from '../domainObjectsHelpers/PopupStyle'; | ||
import { NavigationTool } from '../commands/NavigationTool'; | ||
import { type BaseTool } from '../commands/BaseTool'; | ||
|
||
export abstract class BaseRevealConfig { | ||
// ================================================== | ||
// VIRTUAL METHODS: Override these to config the viewer | ||
// ================================================== | ||
|
||
public createMainToolbar(): Array<BaseCommand | undefined> { | ||
return []; | ||
} | ||
|
||
public createMainToolbarStyle(): PopupStyle { | ||
return new PopupStyle({ right: 0, top: 0, horizontal: false }); | ||
} | ||
|
||
public createAxisGizmoTool(): AxisGizmoTool | undefined { | ||
return undefined; | ||
} | ||
|
||
public createDefaultTool(): BaseTool { | ||
return new NavigationTool(); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
react-components/src/architecture/base/renderTarget/DefaultRevealConfig.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,7 @@ | ||
/*! | ||
* Copyright 2024 Cognite AS | ||
*/ | ||
|
||
import { BaseRevealConfig } from './BaseRevealConfig'; | ||
|
||
export class DefaultRevealConfig extends BaseRevealConfig {} |
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.