From b96066dd6440637627cb092653028b4e55978902 Mon Sep 17 00:00:00 2001 From: Nils Petter Fremming Date: Mon, 19 Aug 2024 09:49:03 +0200 Subject: [PATCH] Smaller fixes --- .../architecture/base/commands/mocks/MockFilterCommand.ts | 2 +- .../base/concreteCommands/PointCloudFilterCommand.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/react-components/src/architecture/base/commands/mocks/MockFilterCommand.ts b/react-components/src/architecture/base/commands/mocks/MockFilterCommand.ts index 92c249fd6fd..856cbd54138 100644 --- a/react-components/src/architecture/base/commands/mocks/MockFilterCommand.ts +++ b/react-components/src/architecture/base/commands/mocks/MockFilterCommand.ts @@ -14,7 +14,7 @@ export class MockFilterCommand extends BaseFilterCommand { private _timeStamp: number | undefined = undefined; private _useAllColor: boolean = true; - private readonly _testDynamic: boolean = false; + private readonly _testDynamic: boolean = false; // True to test dynamic updates (for testing purposes) // ================================================== // OVERRIDES diff --git a/react-components/src/architecture/base/concreteCommands/PointCloudFilterCommand.ts b/react-components/src/architecture/base/concreteCommands/PointCloudFilterCommand.ts index 6700d7b485e..267ead40d55 100644 --- a/react-components/src/architecture/base/concreteCommands/PointCloudFilterCommand.ts +++ b/react-components/src/architecture/base/concreteCommands/PointCloudFilterCommand.ts @@ -46,7 +46,7 @@ export class PointCloudFilterCommand extends BaseFilterCommand { super.initializeChildrenIfNeeded(); } - protected createChildren(): FilterItemCommand[] { + protected override createChildren(): FilterItemCommand[] { const pointCloud = this.getPointCloud(); if (pointCloud === undefined) { return []; @@ -68,7 +68,7 @@ export class PointCloudFilterCommand extends BaseFilterCommand { if (pointCloud === undefined) { return false; } - return isClassesVisible(pointCloud); + return isAllClassesVisible(pointCloud); } public override toggleAllChecked(): void { @@ -76,7 +76,7 @@ export class PointCloudFilterCommand extends BaseFilterCommand { if (pointCloud === undefined) { return; } - const isAllChecked = isClassesVisible(pointCloud); + const isAllChecked = isAllClassesVisible(pointCloud); const classes = pointCloud.getClasses(); if (classes === undefined || classes.length === 0) { return; @@ -214,7 +214,7 @@ function getFirstPointCloudWithClasses( return undefined; } -function isClassesVisible(pointCloud: CognitePointCloudModel): boolean { +function isAllClassesVisible(pointCloud: CognitePointCloudModel): boolean { const classes = pointCloud.getClasses(); if (classes === undefined || classes.length === 0) { return false;