@vived/app 4.24.0 → 4.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Components/App/Controller/index.d.ts +1 -0
- package/lib/Components/App/Controller/index.js +1 -0
- package/lib/Components/App/Controller/updateContentSize.d.ts +2 -0
- package/lib/Components/App/Controller/updateContentSize.js +13 -0
- package/lib/Components/App/Entity/BaseAppState.d.ts +2 -0
- package/lib/Components/App/Entity/BaseAppState.js +7 -0
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.d.ts +9 -0
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.js +15 -0
- package/lib/Components/App/Mocks/index.d.ts +1 -0
- package/lib/Components/App/Mocks/index.js +1 -0
- package/lib/Components/App/UC/SerializeBaseAppState.d.ts +17 -0
- package/lib/Components/App/UC/SerializeBaseAppState.js +59 -0
- package/lib/Components/App/UC/UpdateContentSizeUC.d.ts +7 -0
- package/lib/Components/App/UC/UpdateContentSizeUC.js +33 -0
- package/lib/Components/App/UC/index.d.ts +2 -0
- package/lib/Components/App/UC/index.js +2 -0
- package/lib/Components/Challenge/Adapters/challengeAuthorHelpHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/challengeAuthorHelpHookAdapter.js +23 -0
- package/lib/Components/Challenge/Adapters/challengeConsumerHelpHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/challengeConsumerHelpHookAdapter.js +23 -0
- package/lib/Components/Challenge/Adapters/index.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/index.js +15 -0
- package/lib/Components/Challenge/Adapters/selectedChallengeHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/selectedChallengeHookAdapter.js +29 -0
- package/lib/Components/Challenge/Controller/clickTryChallengeAgain.d.ts +2 -0
- package/lib/Components/Challenge/Controller/clickTryChallengeAgain.js +13 -0
- package/lib/Components/Challenge/Controller/index.d.ts +1 -0
- package/lib/Components/Challenge/Controller/index.js +1 -0
- package/lib/Components/Challenge/Mocks/TryChallengeAgainUcMock.d.ts +8 -0
- package/lib/Components/Challenge/Mocks/TryChallengeAgainUcMock.js +15 -0
- package/lib/Components/Challenge/Mocks/index.d.ts +1 -0
- package/lib/Components/Challenge/Mocks/index.js +1 -0
- package/lib/Components/Challenge/UCs/TryChallengeAgainUC.d.ts +6 -0
- package/lib/Components/Challenge/UCs/TryChallengeAgainUC.js +11 -0
- package/lib/Components/Challenge/UCs/index.d.ts +1 -0
- package/lib/Components/Challenge/UCs/index.js +1 -0
- package/lib/Components/Challenge/index.d.ts +1 -1
- package/lib/Components/Challenge/index.js +1 -1
- package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Adapters/index.js +1 -0
- package/lib/Components/ChannelModel/Adapters/modelHasLandmarksAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/modelHasLandmarksAdapter.js +27 -0
- package/lib/Components/ChannelModel/Mocks/ModelHasLandmarksPmMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/ModelHasLandmarksPmMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Mocks/index.js +1 -0
- package/lib/Components/ChannelModel/PMs/ModelHasLandmarksPM.d.ts +6 -0
- package/lib/Components/ChannelModel/PMs/ModelHasLandmarksPM.js +56 -0
- package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
- package/lib/Components/ChannelModel/PMs/index.js +1 -0
- package/lib/Components/FramedScreen/Adapters/framedContainerAdapter.d.ts +3 -0
- package/lib/Components/FramedScreen/Adapters/framedContainerAdapter.js +23 -0
- package/lib/Components/FramedScreen/Adapters/framedScreenSizeAdapter.d.ts +3 -0
- package/lib/Components/FramedScreen/Adapters/framedScreenSizeAdapter.js +23 -0
- package/lib/Components/FramedScreen/Adapters/index.d.ts +2 -0
- package/lib/Components/FramedScreen/Adapters/index.js +14 -0
- package/lib/Components/FramedScreen/Mocks/FramedContainerPmMock.d.ts +7 -0
- package/lib/Components/FramedScreen/Mocks/FramedContainerPmMock.js +11 -0
- package/lib/Components/FramedScreen/Mocks/FramedScreenSizePmMock.d.ts +8 -0
- package/lib/Components/FramedScreen/Mocks/FramedScreenSizePmMock.js +15 -0
- package/lib/Components/FramedScreen/Mocks/index.d.ts +2 -0
- package/lib/Components/FramedScreen/Mocks/index.js +14 -0
- package/lib/Components/FramedScreen/PM/FramedContainerPM.d.ts +16 -0
- package/lib/Components/FramedScreen/PM/FramedContainerPM.js +66 -0
- package/lib/Components/FramedScreen/PM/FramedScreenSizePM.d.ts +2 -6
- package/lib/Components/FramedScreen/PM/FramedScreenSizePM.js +16 -14
- package/lib/Components/FramedScreen/PM/index.d.ts +1 -1
- package/lib/Components/FramedScreen/PM/index.js +1 -1
- package/lib/Components/FramedScreen/index.d.ts +2 -0
- package/lib/Components/FramedScreen/index.js +2 -0
- package/lib/Components/Landmarks/Adapters/index.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/index.js +14 -0
- package/lib/Components/Landmarks/Adapters/landmarkListAdapter.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/landmarkListAdapter.js +25 -0
- package/lib/Components/Landmarks/Adapters/landmarkSizeAdapter.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/landmarkSizeAdapter.js +23 -0
- package/lib/Components/Landmarks/Controller/MouseLandmark.d.ts +3 -13
- package/lib/Components/Landmarks/Controller/MouseLandmark.js +8 -16
- package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.d.ts +1 -1
- package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.js +2 -8
- package/lib/Components/Landmarks/Controller/TouchLandmark.d.ts +2 -12
- package/lib/Components/Landmarks/Controller/TouchLandmark.js +12 -19
- package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.d.ts +1 -1
- package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.js +3 -9
- package/lib/Components/Landmarks/Controller/deleteAllLandmarks.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/deleteAllLandmarks.js +13 -0
- package/lib/Components/Landmarks/Controller/deleteLandmark.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/deleteLandmark.js +14 -0
- package/lib/Components/Landmarks/Controller/index.d.ts +2 -1
- package/lib/Components/Landmarks/Controller/index.js +2 -1
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.js +19 -0
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.js +19 -0
- package/lib/Components/Landmarks/Entities/LandmarkEntity.d.ts +5 -3
- package/lib/Components/Landmarks/Entities/LandmarkEntity.js +18 -6
- package/lib/Components/Landmarks/Entities/LandmarkGlobals.d.ts +2 -3
- package/lib/Components/Landmarks/Entities/LandmarkGlobals.js +5 -10
- package/lib/Components/Landmarks/Entities/LandmarkRepo.d.ts +7 -1
- package/lib/Components/Landmarks/Entities/LandmarkRepo.js +26 -4
- package/lib/Components/Landmarks/Mocks/DeleteAllLandmarksUcMock.d.ts +8 -0
- package/lib/Components/Landmarks/Mocks/DeleteAllLandmarksUcMock.js +15 -0
- package/lib/Components/Landmarks/Mocks/DeleteLandmarkUcMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/DeleteLandmarkUcMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/LandmarkListPmMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/LandmarkListPmMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/LandmarkSizePmMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/LandmarkSizePmMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/MockLandmark.d.ts +3 -1
- package/lib/Components/Landmarks/Mocks/MockLandmark.js +9 -0
- package/lib/Components/Landmarks/Mocks/MockTryAddNewLandmarkUC.d.ts +10 -0
- package/lib/Components/Landmarks/Mocks/MockTryAddNewLandmarkUC.js +17 -0
- package/lib/Components/Landmarks/Mocks/MockTryPreviewLandmarkUC.d.ts +10 -0
- package/lib/Components/Landmarks/Mocks/MockTryPreviewLandmarkUC.js +17 -0
- package/lib/Components/Landmarks/Mocks/SetLandmarkSizeUcMark.d.ts +8 -0
- package/lib/Components/Landmarks/Mocks/SetLandmarkSizeUcMark.js +12 -0
- package/lib/Components/Landmarks/Mocks/index.d.ts +6 -0
- package/lib/Components/Landmarks/Mocks/index.js +18 -0
- package/lib/Components/Landmarks/Mocks/makeLandmarkDTO.d.ts +2 -0
- package/lib/Components/Landmarks/Mocks/makeLandmarkDTO.js +20 -0
- package/lib/Components/Landmarks/PM/LandmarkListPM.d.ts +4 -8
- package/lib/Components/Landmarks/PM/LandmarkListPM.js +19 -26
- package/lib/Components/Landmarks/PM/LandmarkSizePM.d.ts +4 -8
- package/lib/Components/Landmarks/PM/LandmarkSizePM.js +19 -20
- package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.d.ts +4 -6
- package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.js +14 -27
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUC.d.ts +7 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUC.js +35 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUndoRedo.d.ts +10 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUndoRedo.js +37 -0
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.d.ts +5 -6
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.js +24 -34
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.d.ts +4 -6
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.js +14 -27
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.d.ts +2 -0
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.js +27 -40
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.d.ts +6 -9
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.js +33 -27
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.d.ts +10 -6
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.js +11 -20
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.d.ts +1 -0
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +22 -18
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.d.ts +3 -8
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.js +17 -18
- package/lib/Components/Landmarks/UseCases/index.d.ts +1 -1
- package/lib/Components/Landmarks/UseCases/index.js +1 -1
- package/lib/Components/Landmarks/index.d.ts +2 -0
- package/lib/Components/Landmarks/index.js +2 -0
- package/lib/Components/StateMachine/Entities/StateMachineEntity.d.ts +1 -1
- package/lib/Components/StateMachine/Entities/StateMachineEntity.js +6 -2
- package/lib/Components/zSpace/Adapters/index.d.ts +4 -0
- package/lib/Components/zSpace/Adapters/index.js +16 -0
- package/lib/Components/zSpace/Adapters/zSpaceDisplayAdapter.d.ts +3 -0
- package/lib/Components/zSpace/Adapters/zSpaceDisplayAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsEnabledAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsEnabledAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsSupportedAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsSupportedAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceViewerScaleAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceViewerScaleAdapter.js +23 -0
- package/lib/Components/zSpace/Mocks/ZSpaceDisplayPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceDisplayPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsEnabledPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsEnabledPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsSupportedPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsSupportedPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceViewerScalePmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceViewerScalePmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/index.d.ts +5 -0
- package/lib/Components/zSpace/Mocks/index.js +17 -0
- package/lib/Components/zSpace/PM/ZSpaceDisplayPM.d.ts +3 -0
- package/lib/Components/zSpace/PM/ZSpaceDisplayPM.js +20 -25
- package/lib/Components/zSpace/PM/ZSpaceIsEnabledPM.d.ts +2 -0
- package/lib/Components/zSpace/PM/ZSpaceIsEnabledPM.js +10 -16
- package/lib/Components/zSpace/PM/ZSpaceIsSupportedPM.js +10 -18
- package/lib/Components/zSpace/PM/ZSpaceViewerScalePM.d.ts +2 -1
- package/lib/Components/zSpace/PM/ZSpaceViewerScalePM.js +9 -16
- package/lib/Components/zSpace/index.d.ts +2 -0
- package/lib/Components/zSpace/index.js +2 -0
- package/lib/Entities/RangedNumber.d.ts +16 -0
- package/lib/Entities/RangedNumber.js +35 -0
- package/lib/Entities/index.d.ts +1 -0
- package/lib/Entities/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeZSpaceDisplayPM = exports.ZSpaceDisplayPM = void 0;
|
|
3
|
+
exports.makeZSpaceDisplayPM = exports.ZSpaceDisplayPM = exports.defaultZSpaceDisplayVM = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../AppObject");
|
|
4
5
|
const AppObjectPM_1 = require("../../../AppObject/AppObjectPM");
|
|
5
6
|
const ValueObjects_1 = require("../../../ValueObjects");
|
|
6
7
|
const ZSpaceDisplayEntity_1 = require("../Entities/ZSpaceDisplayEntity");
|
|
7
8
|
const ZSpaceEntity_1 = require("../Entities/ZSpaceEntity");
|
|
9
|
+
exports.defaultZSpaceDisplayVM = {
|
|
10
|
+
pixelSize: ValueObjects_1.Vector2.Zero(),
|
|
11
|
+
show: false,
|
|
12
|
+
worldSize: ValueObjects_1.Vector2.Zero(),
|
|
13
|
+
};
|
|
8
14
|
class ZSpaceDisplayPM extends AppObjectPM_1.AppObjectPM {
|
|
9
15
|
}
|
|
10
16
|
exports.ZSpaceDisplayPM = ZSpaceDisplayPM;
|
|
11
17
|
ZSpaceDisplayPM.type = "ZSpaceDisplayPM";
|
|
18
|
+
ZSpaceDisplayPM.get = (appObjects) => AppObject_1.getSingletonComponent(ZSpaceDisplayPM.type, appObjects);
|
|
12
19
|
function makeZSpaceDisplayPM(appObject) {
|
|
13
20
|
return new ZSpaceDisplayPMImp(appObject);
|
|
14
21
|
}
|
|
15
22
|
exports.makeZSpaceDisplayPM = makeZSpaceDisplayPM;
|
|
16
23
|
class ZSpaceDisplayPMImp extends ZSpaceDisplayPM {
|
|
17
24
|
constructor(appObject) {
|
|
25
|
+
var _a, _b;
|
|
18
26
|
super(appObject, ZSpaceDisplayPM.type);
|
|
19
|
-
this.
|
|
27
|
+
this.onZSpaceChange = () => {
|
|
20
28
|
var _a, _b;
|
|
21
29
|
if (!this.zSpaceDisplay)
|
|
22
30
|
return;
|
|
@@ -28,29 +36,16 @@ class ZSpaceDisplayPMImp extends ZSpaceDisplayPM {
|
|
|
28
36
|
};
|
|
29
37
|
this.doUpdateView(vm);
|
|
30
38
|
};
|
|
31
|
-
this.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.warn("App Object does not have a ZSpace Display Entity");
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
this.zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(appObject.appObjectRepo);
|
|
45
|
-
if (!this.zSpaceEntity) {
|
|
46
|
-
this.warn("Could not find a ZSpace Entity");
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
this.zSpaceDisplay.addChangeObserver(this.onEntityChange);
|
|
50
|
-
this.zSpaceDisplay.addOnDisposeObserver(this.dispose);
|
|
51
|
-
this.zSpaceEntity.addChangeObserver(this.onEntityChange);
|
|
52
|
-
this.zSpaceEntity.addOnDisposeObserver(this.dispose);
|
|
53
|
-
this.onEntityChange();
|
|
39
|
+
(_a = this.zSpaceDisplay) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onZSpaceChange);
|
|
40
|
+
(_b = this.zSpaceEntity) === null || _b === void 0 ? void 0 : _b.addChangeObserver(this.onZSpaceChange);
|
|
41
|
+
this.onZSpaceChange();
|
|
42
|
+
this.appObjects.registerSingleton(this);
|
|
43
|
+
}
|
|
44
|
+
get zSpaceDisplay() {
|
|
45
|
+
return this.getCachedSingleton(ZSpaceDisplayEntity_1.ZSpaceDisplayEntity.type);
|
|
46
|
+
}
|
|
47
|
+
get zSpaceEntity() {
|
|
48
|
+
return this.getCachedSingleton(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
54
49
|
}
|
|
55
50
|
vmsAreEqual(a, b) {
|
|
56
51
|
if (a.show === b.show &&
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { AppObjectRepo } from "../../../AppObject";
|
|
1
2
|
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
3
|
import { AppObjectPM } from "../../../AppObject/AppObjectPM";
|
|
3
4
|
export declare abstract class ZSpaceIsEnabledPM extends AppObjectPM<boolean> {
|
|
4
5
|
static readonly type = "ZSpaceIsEnabledPM";
|
|
6
|
+
static get: (appObjects: AppObjectRepo) => ZSpaceIsEnabledPM | undefined;
|
|
5
7
|
}
|
|
6
8
|
export declare function makeZSpaceIsEnabledPM(appObject: AppObject): ZSpaceIsEnabledPM;
|
|
@@ -1,39 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeZSpaceIsEnabledPM = exports.ZSpaceIsEnabledPM = void 0;
|
|
4
|
+
const AppObject_1 = require("../../../AppObject");
|
|
4
5
|
const AppObjectPM_1 = require("../../../AppObject/AppObjectPM");
|
|
5
6
|
const ZSpaceEntity_1 = require("../Entities/ZSpaceEntity");
|
|
6
7
|
class ZSpaceIsEnabledPM extends AppObjectPM_1.AppObjectPM {
|
|
7
8
|
}
|
|
8
9
|
exports.ZSpaceIsEnabledPM = ZSpaceIsEnabledPM;
|
|
9
10
|
ZSpaceIsEnabledPM.type = "ZSpaceIsEnabledPM";
|
|
11
|
+
ZSpaceIsEnabledPM.get = (appObjects) => AppObject_1.getSingletonComponent(ZSpaceIsEnabledPM.type, appObjects);
|
|
10
12
|
function makeZSpaceIsEnabledPM(appObject) {
|
|
11
13
|
return new ZSpaceIsEnabledPMImp(appObject);
|
|
12
14
|
}
|
|
13
15
|
exports.makeZSpaceIsEnabledPM = makeZSpaceIsEnabledPM;
|
|
14
16
|
class ZSpaceIsEnabledPMImp extends ZSpaceIsEnabledPM {
|
|
15
17
|
constructor(appObject) {
|
|
18
|
+
var _a;
|
|
16
19
|
super(appObject, ZSpaceIsEnabledPM.type);
|
|
17
|
-
this.
|
|
20
|
+
this.onZSpaceChange = () => {
|
|
18
21
|
if (!this.zSpace)
|
|
19
22
|
return;
|
|
20
23
|
this.doUpdateView(this.zSpace.enabled);
|
|
21
24
|
};
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.zSpace = appObject.getComponent(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
29
|
-
if (this.zSpace) {
|
|
30
|
-
this.zSpace.addChangeObserver(this.onRepoChange);
|
|
31
|
-
this.zSpace.addOnDisposeObserver(() => this.dispose());
|
|
32
|
-
this.onRepoChange();
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
this.warn("App Object does not have a ZSpace Entity");
|
|
36
|
-
}
|
|
25
|
+
(_a = this.zSpace) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onZSpaceChange);
|
|
26
|
+
this.onZSpaceChange();
|
|
27
|
+
this.appObjects.registerSingleton(this);
|
|
28
|
+
}
|
|
29
|
+
get zSpace() {
|
|
30
|
+
return this.getCachedSingleton(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
37
31
|
}
|
|
38
32
|
vmsAreEqual(a, b) {
|
|
39
33
|
return a === b;
|
|
@@ -15,27 +15,19 @@ function makeZSpaceIsSupportedPM(appObject) {
|
|
|
15
15
|
exports.makeZSpaceIsSupportedPM = makeZSpaceIsSupportedPM;
|
|
16
16
|
class ZSpaceIsSupportedPMImp extends ZSpaceIsSupportedPM {
|
|
17
17
|
constructor(appObject) {
|
|
18
|
+
var _a;
|
|
18
19
|
super(appObject, ZSpaceIsSupportedPM.type);
|
|
19
|
-
this.
|
|
20
|
-
if (!this.
|
|
20
|
+
this.onZSpaceChange = () => {
|
|
21
|
+
if (!this.zSpaceEntity)
|
|
21
22
|
return;
|
|
22
|
-
this.doUpdateView(this.
|
|
23
|
+
this.doUpdateView(this.zSpaceEntity.isSupported);
|
|
23
24
|
};
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.zSpace = appObject.getComponent(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
31
|
-
if (this.zSpace) {
|
|
32
|
-
this.zSpace.addChangeObserver(this.onRepoChange);
|
|
33
|
-
this.zSpace.addOnDisposeObserver(() => this.dispose());
|
|
34
|
-
this.onRepoChange();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
this.warn("App Object does not have a ZSpace Entity");
|
|
38
|
-
}
|
|
25
|
+
(_a = this.zSpaceEntity) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onZSpaceChange);
|
|
26
|
+
this.onZSpaceChange();
|
|
27
|
+
this.appObjects.registerSingleton(this);
|
|
28
|
+
}
|
|
29
|
+
get zSpaceEntity() {
|
|
30
|
+
return this.getCachedSingleton(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
39
31
|
}
|
|
40
32
|
vmsAreEqual(a, b) {
|
|
41
33
|
return a === b;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AppObject, AppObjectPM } from "../../../AppObject";
|
|
1
|
+
import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
|
|
2
2
|
export declare abstract class ZSpaceViewerScalePM extends AppObjectPM<number> {
|
|
3
3
|
static readonly type = "ZSpaceViewerScalePM";
|
|
4
|
+
static get: (appObjects: AppObjectRepo) => ZSpaceViewerScalePM | undefined;
|
|
4
5
|
}
|
|
5
6
|
export declare function makeZSpaceViewerScalePM(appObject: AppObject): ZSpaceViewerScalePM;
|
|
@@ -7,33 +7,26 @@ class ZSpaceViewerScalePM extends AppObject_1.AppObjectPM {
|
|
|
7
7
|
}
|
|
8
8
|
exports.ZSpaceViewerScalePM = ZSpaceViewerScalePM;
|
|
9
9
|
ZSpaceViewerScalePM.type = "ZSpaceViewerScalePM";
|
|
10
|
+
ZSpaceViewerScalePM.get = (appObjects) => AppObject_1.getSingletonComponent(ZSpaceViewerScalePM.type, appObjects);
|
|
10
11
|
function makeZSpaceViewerScalePM(appObject) {
|
|
11
12
|
return new ZSpaceViewerScalePMImp(appObject);
|
|
12
13
|
}
|
|
13
14
|
exports.makeZSpaceViewerScalePM = makeZSpaceViewerScalePM;
|
|
14
15
|
class ZSpaceViewerScalePMImp extends ZSpaceViewerScalePM {
|
|
15
16
|
constructor(appObject) {
|
|
17
|
+
var _a;
|
|
16
18
|
super(appObject, ZSpaceViewerScalePM.type);
|
|
17
|
-
this.
|
|
19
|
+
this.onZSpaceChange = () => {
|
|
18
20
|
if (!this.zSpace)
|
|
19
21
|
return;
|
|
20
22
|
this.doUpdateView(this.zSpace.viewerScale);
|
|
21
23
|
};
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.zSpace = appObject.getComponent(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
29
|
-
if (this.zSpace) {
|
|
30
|
-
this.zSpace.addChangeObserver(this.onRepoChange);
|
|
31
|
-
this.zSpace.addOnDisposeObserver(() => this.dispose());
|
|
32
|
-
this.onRepoChange();
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
this.warn("App Object does not have a ZSpace Entity");
|
|
36
|
-
}
|
|
24
|
+
(_a = this.zSpace) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onZSpaceChange);
|
|
25
|
+
this.onZSpaceChange();
|
|
26
|
+
this.appObjects.registerSingleton(this);
|
|
27
|
+
}
|
|
28
|
+
get zSpace() {
|
|
29
|
+
return this.getCachedSingleton(ZSpaceEntity_1.ZSpaceEntity.type);
|
|
37
30
|
}
|
|
38
31
|
vmsAreEqual(a, b) {
|
|
39
32
|
return a === b;
|
|
@@ -10,6 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Adapters"), exports);
|
|
13
14
|
__exportStar(require("./Entities"), exports);
|
|
15
|
+
__exportStar(require("./Mocks"), exports);
|
|
14
16
|
__exportStar(require("./PM"), exports);
|
|
15
17
|
__exportStar(require("./UC"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface RangedNumberProperties {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
initialValue: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class RangedNumber {
|
|
7
|
+
readonly maxValue: number;
|
|
8
|
+
readonly minValue: number;
|
|
9
|
+
private _val;
|
|
10
|
+
get val(): number;
|
|
11
|
+
set val(x: number);
|
|
12
|
+
setValQuietly(val: number): void;
|
|
13
|
+
private clamp;
|
|
14
|
+
private onChangeCallback;
|
|
15
|
+
constructor(props: RangedNumberProperties, onChangeCallback: () => void);
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RangedNumber = void 0;
|
|
4
|
+
class RangedNumber {
|
|
5
|
+
constructor(props, onChangeCallback) {
|
|
6
|
+
this.maxValue = props.max;
|
|
7
|
+
this.minValue = props.min;
|
|
8
|
+
this._val = this.clamp(props.initialValue);
|
|
9
|
+
this.onChangeCallback = onChangeCallback;
|
|
10
|
+
}
|
|
11
|
+
get val() {
|
|
12
|
+
return this._val;
|
|
13
|
+
}
|
|
14
|
+
set val(x) {
|
|
15
|
+
const y = this.clamp(x);
|
|
16
|
+
if (this._val === y)
|
|
17
|
+
return;
|
|
18
|
+
this._val = y;
|
|
19
|
+
this.onChangeCallback();
|
|
20
|
+
}
|
|
21
|
+
setValQuietly(val) {
|
|
22
|
+
this._val = this.clamp(val);
|
|
23
|
+
}
|
|
24
|
+
clamp(x) {
|
|
25
|
+
let rVal = x;
|
|
26
|
+
if (x > this.maxValue) {
|
|
27
|
+
rVal = this.maxValue;
|
|
28
|
+
}
|
|
29
|
+
else if (x < this.minValue) {
|
|
30
|
+
rVal = this.minValue;
|
|
31
|
+
}
|
|
32
|
+
return rVal;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.RangedNumber = RangedNumber;
|
package/lib/Entities/index.d.ts
CHANGED
package/lib/Entities/index.js
CHANGED
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./MessageSystem"), exports);
|
|
14
14
|
__exportStar(require("./ObservableEntity"), exports);
|
|
15
15
|
__exportStar(require("./ObserverList"), exports);
|
|
16
|
+
__exportStar(require("./RangedNumber"), exports);
|
|
16
17
|
__exportStar(require("./TransformNode"), exports);
|
|
17
18
|
__exportStar(require("./WorkPlane"), exports);
|
|
18
19
|
__exportStar(require("./MemoizedAngle"), exports);
|