Skip to content

Commit

Permalink
fix(react-compoenents): Fix hasPanelInfo (#4893)
Browse files Browse the repository at this point in the history
* Initial commit

* Update package.json

* Update IconComponentMapper.tsx

* Revert "Update IconComponentMapper.tsx"

This reverts commit 6d7e104.
  • Loading branch information
nilscognite authored Nov 25, 2024
1 parent 03ad7e4 commit dd5054d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cognite/reveal-react-components",
"version": "0.68.1",
"version": "0.68.2",
"exports": {
".": {
"import": "./dist/index.js",
Expand Down
18 changes: 9 additions & 9 deletions react-components/src/architecture/base/commands/BaseTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ import { UndoManager } from '../undo/UndoManager';
import { CommandChanges } from '../domainObjectsHelpers/CommandChanges';
import { ContextMenuUpdater } from '../reactUpdaters/ContextMenuUpdater';

/**
* AnchorDialog
*/
export type AnchoredDialogContent = {
position: Vector3;
onCloseCallback: () => void;
contentCommands: BaseCommand[];
};

/**
* Base class for interactions in the 3D viewer
* Provides common functionality and virtual methods to be overridden by derived classes.
Expand Down Expand Up @@ -286,3 +277,12 @@ export abstract class BaseTool extends RenderTargetCommand {
return this._renderTarget?.contextMenuController.contextMenuPositionData !== undefined;
}
}

/**
* AnchorDialog
*/
export type AnchoredDialogContent = {
position: Vector3;
onCloseCallback: () => void;
contentCommands: BaseCommand[];
};
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class Image360AnnotationDomainObject extends LineDomainObject {
return { untranslated: '360 image annotation' };
}

public override get hasPanelInfo(): boolean {
return false;
}

public override clone(what?: symbol): DomainObject {
const clone = new Image360AnnotationDomainObject(this.connectedImageId);
clone.copyFrom(this, what);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ export class BoxGizmoDomainObject extends BoxDomainObject {
return style;
}

public override get hasPanelInfo(): boolean {
return true;
}

public override clone(what?: symbol): DomainObject {
const clone = new BoxGizmoDomainObject();
clone.copyFrom(this, what);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ export class CylinderGizmoDomainObject extends CylinderDomainObject {
return style;
}

public override get hasPanelInfo(): boolean {
return true;
}

public override clone(what?: symbol): DomainObject {
const clone = new CylinderGizmoDomainObject();
clone.copyFrom(this, what);
Expand Down

0 comments on commit dd5054d

Please sign in to comment.