@vived/app 4.23.0 → 4.24.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/AppObject/index.d.ts +1 -0
- package/lib/AppObject/index.js +1 -0
- package/lib/AppObject/printAppObjectDetails.d.ts +2 -0
- package/lib/AppObject/printAppObjectDetails.js +18 -0
- package/lib/Components/ChannelModel/Adapters/activeModelAdapter.js +2 -2
- package/lib/Components/ChannelModel/Adapters/activeModelObjectListAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/activeModelObjectListAdapter.js +23 -0
- package/lib/Components/ChannelModel/Adapters/index.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/index.js +2 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreHiddenAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/modelObjectsAreHiddenAdapter.js +27 -0
- package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -1
- package/lib/Components/ChannelModel/Controllers/index.js +1 -1
- package/lib/Components/ChannelModel/Controllers/setModelObjectLabel.js +1 -1
- package/lib/Components/ChannelModel/Controllers/unhideAllActiveObjects.d.ts +2 -0
- package/lib/Components/ChannelModel/Controllers/unhideAllActiveObjects.js +23 -0
- package/lib/Components/ChannelModel/Entities/ChannelModel.d.ts +2 -0
- package/lib/Components/ChannelModel/Entities/ChannelModel.js +11 -2
- package/lib/Components/ChannelModel/Entities/ChannelModelObject.d.ts +2 -4
- package/lib/Components/ChannelModel/Entities/ChannelModelObject.js +3 -20
- package/lib/Components/ChannelModel/Mocks/ActiveModelObjectListMock.d.ts +8 -0
- package/lib/Components/ChannelModel/Mocks/ActiveModelObjectListMock.js +15 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreHiddenPMMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/ModelObjectsAreHiddenPMMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/UnhideAllChannelModelObjectsUCMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/UnhideAllChannelModelObjectsUCMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +3 -0
- package/lib/Components/ChannelModel/Mocks/index.js +3 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelObjectListPM.d.ts +14 -0
- package/lib/Components/ChannelModel/PMs/ActiveModelObjectListPM.js +60 -0
- package/lib/Components/ChannelModel/PMs/ChannelModelObjectPM.js +2 -2
- package/lib/Components/ChannelModel/PMs/ChannelModelPM.js +1 -1
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreHiddenPM.d.ts +6 -0
- package/lib/Components/ChannelModel/PMs/ModelObjectsAreHiddenPM.js +58 -0
- package/lib/Components/ChannelModel/PMs/index.d.ts +2 -0
- package/lib/Components/ChannelModel/PMs/index.js +2 -0
- package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +3 -0
- package/lib/Components/ChannelModel/UC/UnhideAllAppObjectsUndoRedo.d.ts +10 -0
- package/lib/Components/ChannelModel/UC/UnhideAllAppObjectsUndoRedo.js +39 -0
- package/lib/Components/ChannelModel/UC/UnhideAllChannelModelObjectsUC.d.ts +7 -0
- package/lib/Components/ChannelModel/UC/UnhideAllChannelModelObjectsUC.js +51 -0
- package/lib/Components/ChannelModel/UC/index.d.ts +2 -0
- package/lib/Components/ChannelModel/UC/index.js +2 -0
- package/lib/Components/Enablement/Adapters/enablementAdapter.d.ts +2 -0
- package/lib/Components/Enablement/Adapters/enablementAdapter.js +23 -0
- package/lib/Components/Enablement/Adapters/index.d.ts +1 -0
- package/lib/Components/Enablement/Adapters/index.js +13 -0
- package/lib/Components/Enablement/Entities/EnablementEntity.d.ts +17 -0
- package/lib/Components/Enablement/Entities/EnablementEntity.js +37 -0
- package/lib/Components/Enablement/Entities/index.d.ts +1 -1
- package/lib/Components/Enablement/Entities/index.js +1 -1
- package/lib/Components/Enablement/Mocks/EnabledStatePMMock.d.ts +7 -0
- package/lib/Components/Enablement/Mocks/EnabledStatePMMock.js +11 -0
- package/lib/Components/Enablement/Mocks/index.d.ts +1 -0
- package/lib/Components/Enablement/Mocks/index.js +13 -0
- package/lib/Components/Enablement/PM/EnabledStatePM.d.ts +8 -0
- package/lib/Components/Enablement/PM/EnabledStatePM.js +46 -0
- package/lib/Components/Enablement/PM/index.d.ts +1 -1
- package/lib/Components/Enablement/PM/index.js +1 -1
- package/lib/Components/Enablement/index.d.ts +2 -0
- package/lib/Components/Enablement/index.js +2 -0
- package/lib/Components/Hideable/Adapters/index.d.ts +1 -0
- package/lib/Components/Hideable/Adapters/index.js +13 -0
- package/lib/Components/Hideable/Adapters/isHiddenAdapter.d.ts +2 -0
- package/lib/Components/Hideable/Adapters/isHiddenAdapter.js +23 -0
- package/lib/Components/Hideable/Controllers/HideMC.d.ts +10 -0
- package/lib/Components/Hideable/Controllers/HideMC.js +32 -0
- package/lib/Components/Hideable/Controllers/HideTC.d.ts +10 -0
- package/lib/Components/Hideable/Controllers/HideTC.js +32 -0
- package/lib/Components/Hideable/Controllers/clickToggleIsHidden.d.ts +2 -0
- package/lib/Components/Hideable/Controllers/clickToggleIsHidden.js +14 -0
- package/lib/Components/Hideable/Controllers/index.d.ts +3 -0
- package/lib/Components/Hideable/Controllers/index.js +15 -0
- package/lib/Components/Hideable/Entities/Hideable.d.ts +2 -2
- package/lib/Components/Hideable/Entities/Hideable.js +6 -2
- package/lib/Components/Hideable/Mocks/HideUCMock.d.ts +8 -0
- package/lib/Components/Hideable/Mocks/HideUCMock.js +12 -0
- package/lib/Components/Hideable/Mocks/IsHiddenPMock.d.ts +7 -0
- package/lib/Components/Hideable/Mocks/IsHiddenPMock.js +11 -0
- package/lib/Components/Hideable/Mocks/TryHideWithPickUCMock.d.ts +9 -0
- package/lib/Components/Hideable/Mocks/TryHideWithPickUCMock.js +16 -0
- package/lib/Components/Hideable/Mocks/index.d.ts +3 -0
- package/lib/Components/Hideable/Mocks/index.js +15 -0
- package/lib/Components/Hideable/PM/IsHiddenPM.d.ts +3 -7
- package/lib/Components/Hideable/PM/IsHiddenPM.js +20 -12
- package/lib/Components/Hideable/UCs/HideUC.d.ts +8 -0
- package/lib/Components/Hideable/UCs/HideUC.js +74 -0
- package/lib/Components/Hideable/UCs/TryHideWithPickUC.d.ts +9 -0
- package/lib/Components/Hideable/UCs/TryHideWithPickUC.js +62 -0
- package/lib/Components/Hideable/UCs/index.d.ts +2 -0
- package/lib/Components/Hideable/UCs/index.js +14 -0
- package/lib/Components/Hideable/index.d.ts +4 -0
- package/lib/Components/Hideable/index.js +4 -0
- package/lib/Components/HoverLabel/Adapters/allowHoverLabelAdapter.d.ts +2 -0
- package/lib/Components/HoverLabel/Adapters/allowHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Adapters/index.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/index.js +15 -0
- package/lib/Components/HoverLabel/Adapters/screenHoverLabelAdapter.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/screenHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Adapters/worldHoverLabelAdapter.d.ts +3 -0
- package/lib/Components/HoverLabel/Adapters/worldHoverLabelAdapter.js +23 -0
- package/lib/Components/HoverLabel/Controllers/HoverLabelMouse.js +2 -2
- package/lib/Components/HoverLabel/Controllers/HoverLabelTouch.js +2 -2
- package/lib/Components/HoverLabel/Controllers/index.d.ts +1 -1
- package/lib/Components/HoverLabel/Controllers/index.js +1 -1
- package/lib/Components/HoverLabel/Controllers/toggleAllowHoverLabel.d.ts +2 -0
- package/lib/Components/HoverLabel/Controllers/toggleAllowHoverLabel.js +13 -0
- package/lib/Components/HoverLabel/Entities/HoverLabelEntity.d.ts +23 -0
- package/lib/Components/HoverLabel/Entities/HoverLabelEntity.js +102 -0
- package/lib/Components/HoverLabel/Entities/index.d.ts +1 -1
- package/lib/Components/HoverLabel/Entities/index.js +1 -1
- package/lib/Components/HoverLabel/Mocks/AllowHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/AllowHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/ScreenHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/ScreenHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/WorldHoverLabelPmMock.d.ts +8 -0
- package/lib/Components/HoverLabel/Mocks/WorldHoverLabelPmMock.js +15 -0
- package/lib/Components/HoverLabel/Mocks/index.d.ts +4 -0
- package/lib/Components/HoverLabel/Mocks/index.js +16 -0
- package/lib/Components/HoverLabel/PM/AllowHoverLabelPM.d.ts +4 -9
- package/lib/Components/HoverLabel/PM/AllowHoverLabelPM.js +16 -26
- package/lib/Components/HoverLabel/PM/ScreenHoverLabelPM.d.ts +2 -6
- package/lib/Components/HoverLabel/PM/ScreenHoverLabelPM.js +18 -20
- package/lib/Components/HoverLabel/PM/WorldHoverLabelPM.d.ts +2 -6
- package/lib/Components/HoverLabel/PM/WorldHoverLabelPM.js +18 -20
- package/lib/Components/HoverLabel/UseCases/SerializeAllowHoverLabel.js +2 -2
- package/lib/Components/HoverLabel/UseCases/ToggleAllowHoverLabel.js +2 -2
- package/lib/Components/HoverLabel/UseCases/TryShowHoverLabel.js +3 -3
- package/lib/Components/HoverLabel/index.d.ts +2 -0
- package/lib/Components/HoverLabel/index.js +2 -0
- package/lib/Components/KeyboardInput/Mocks/index.d.ts +1 -0
- package/lib/Components/KeyboardInput/Mocks/index.js +13 -0
- package/lib/Components/KeyboardInput/index.d.ts +1 -0
- package/lib/Components/KeyboardInput/index.js +1 -0
- package/lib/Components/Label/Adapters/index.d.ts +1 -0
- package/lib/Components/Label/Adapters/index.js +13 -0
- package/lib/Components/Label/Adapters/labelAdapter.d.ts +3 -0
- package/lib/Components/Label/Adapters/labelAdapter.js +23 -0
- package/lib/Components/Label/Entities/Label.d.ts +2 -1
- package/lib/Components/Label/Entities/Label.js +6 -0
- package/lib/Components/Label/Entities/LabelEntity.d.ts +16 -0
- package/lib/Components/Label/Entities/LabelEntity.js +67 -0
- package/lib/Components/Label/Entities/index.d.ts +1 -1
- package/lib/Components/Label/Entities/index.js +1 -1
- package/lib/Components/Label/Mocks/LabelPMMock.d.ts +7 -0
- package/lib/Components/Label/Mocks/LabelPMMock.js +11 -0
- package/lib/Components/Label/Mocks/index.d.ts +1 -0
- package/lib/Components/Label/Mocks/index.js +13 -0
- package/lib/Components/Label/PM/LabelPM.d.ts +3 -7
- package/lib/Components/Label/PM/LabelPM.js +26 -20
- package/lib/Components/Label/UC/ClearCustomLabelUC.d.ts +1 -1
- package/lib/Components/Label/UC/ClearCustomLabelUC.js +3 -4
- package/lib/Components/Label/UC/ClearCustomLabelUndoRedo.js +1 -1
- package/lib/Components/Label/UC/SetCustomLabelUC.d.ts +1 -1
- package/lib/Components/Label/UC/SetCustomLabelUC.js +3 -4
- package/lib/Components/Label/UC/SetCustomLabelUndoRedo.js +1 -1
- package/lib/Components/Label/index.d.ts +3 -1
- package/lib/Components/Label/index.js +3 -1
- package/lib/Components/Landmarks/Entities/LandmarkEntity.d.ts +2 -2
- package/lib/Components/Landmarks/Entities/LandmarkEntity.js +1 -1
- package/lib/Components/Landmarks/Mocks/MockLandmark.d.ts +2 -2
- package/lib/Components/Landmarks/UseCases/AddLandmarkUC.js +1 -1
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.d.ts +1 -1
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.js +4 -4
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +1 -1
- package/lib/Components/OverlayColor/Adapters/index.d.ts +1 -0
- package/lib/Components/OverlayColor/Adapters/index.js +13 -0
- package/lib/Components/OverlayColor/Adapters/overlayColorAdapter.d.ts +3 -0
- package/lib/Components/OverlayColor/Adapters/overlayColorAdapter.js +24 -0
- package/lib/Components/OverlayColor/Entities/OverlayColor.d.ts +2 -1
- package/lib/Components/OverlayColor/Entities/OverlayColor.js +4 -0
- package/lib/Components/OverlayColor/Mocks/OverlayColorPMMock.d.ts +7 -0
- package/lib/Components/OverlayColor/Mocks/OverlayColorPMMock.js +11 -0
- package/lib/Components/OverlayColor/Mocks/index.d.ts +1 -0
- package/lib/Components/OverlayColor/Mocks/index.js +13 -0
- package/lib/Components/OverlayColor/PM/OverlayColorPM.d.ts +2 -6
- package/lib/Components/OverlayColor/PM/OverlayColorPM.js +20 -12
- package/lib/Components/OverlayColor/index.d.ts +3 -1
- package/lib/Components/OverlayColor/index.js +3 -1
- package/lib/Components/Selection/Adapters/index.d.ts +2 -0
- package/lib/Components/Selection/Adapters/index.js +14 -0
- package/lib/Components/Selection/Adapters/selectableStateAdapter.d.ts +3 -0
- package/lib/Components/Selection/Adapters/selectableStateAdapter.js +23 -0
- package/lib/Components/Selection/Adapters/selectedObjectAdapter.d.ts +2 -0
- package/lib/Components/Selection/Adapters/selectedObjectAdapter.js +23 -0
- package/lib/Components/Selection/Controller/MouseHoverOnAppObject.js +1 -1
- package/lib/Components/Selection/Controller/MousePressOnAppObject.js +3 -3
- package/lib/Components/Selection/Controller/MouseSelectAppObject.js +1 -1
- package/lib/Components/Selection/Controller/StylusHoverOnAppObjectSC.d.ts +11 -0
- package/lib/Components/Selection/Controller/StylusHoverOnAppObjectSC.js +41 -0
- package/lib/Components/Selection/Controller/StylusPressOnAppObjectSC.d.ts +18 -0
- package/lib/Components/Selection/Controller/StylusPressOnAppObjectSC.js +70 -0
- package/lib/Components/Selection/Controller/StylusSelectAppObjectSC.d.ts +11 -0
- package/lib/Components/Selection/Controller/StylusSelectAppObjectSC.js +39 -0
- package/lib/Components/Selection/Controller/TapToSelectAppObject.js +1 -1
- package/lib/Components/Selection/Controller/TouchPressOnAppObject.js +4 -4
- package/lib/Components/Selection/Controller/index.d.ts +5 -3
- package/lib/Components/Selection/Controller/index.js +5 -3
- package/lib/Components/Selection/Controller/selectAppObject.d.ts +2 -0
- package/lib/Components/Selection/Controller/selectAppObject.js +14 -0
- package/lib/Components/Selection/Controller/setHoverOnAppObject.d.ts +2 -0
- package/lib/Components/Selection/Controller/setHoverOnAppObject.js +14 -0
- package/lib/Components/Selection/Entities/Selection.d.ts +1 -0
- package/lib/Components/Selection/Entities/Selection.js +9 -3
- package/lib/Components/Selection/Mocks/HoverAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/HoverAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/PressAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/PressAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/SelectAppObjectUCMock.d.ts +10 -0
- package/lib/Components/Selection/Mocks/SelectAppObjectUCMock.js +14 -0
- package/lib/Components/Selection/Mocks/SelectableStatePMMock.d.ts +7 -0
- package/lib/Components/Selection/Mocks/SelectableStatePMMock.js +11 -0
- package/lib/Components/Selection/Mocks/SelectedObjectPMMock.d.ts +8 -0
- package/lib/Components/Selection/Mocks/SelectedObjectPMMock.js +15 -0
- package/lib/Components/Selection/Mocks/index.d.ts +5 -0
- package/lib/Components/Selection/Mocks/index.js +17 -0
- package/lib/Components/Selection/PM/SelectableStatePM.d.ts +5 -7
- package/lib/Components/Selection/PM/SelectableStatePM.js +25 -18
- package/lib/Components/Selection/PM/SelectedObjectPM.d.ts +2 -0
- package/lib/Components/Selection/PM/SelectedObjectPM.js +10 -14
- package/lib/Components/Selection/UC/HoverAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/HoverAppObjectUC.js +10 -6
- package/lib/Components/Selection/UC/PressAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/PressAppObjectUC.js +10 -6
- package/lib/Components/Selection/UC/SelectAppObjectUC.d.ts +4 -2
- package/lib/Components/Selection/UC/SelectAppObjectUC.js +10 -6
- package/lib/Components/Selection/index.d.ts +4 -2
- package/lib/Components/Selection/index.js +4 -2
- package/lib/Components/Tools/Adapters/index.d.ts +1 -0
- package/lib/Components/Tools/Adapters/index.js +13 -0
- package/lib/Components/Tools/Adapters/toolAdapter.d.ts +3 -0
- package/lib/Components/Tools/Adapters/toolAdapter.js +26 -0
- package/lib/Components/Tools/Controller/ToolHotkeys.js +1 -1
- package/lib/Components/Tools/Entities/ToolEntity.d.ts +5 -2
- package/lib/Components/Tools/Entities/ToolEntity.js +28 -8
- package/lib/Components/Tools/Entities/ToolRepository.js +4 -1
- package/lib/Components/Tools/Mocks/ToolPMMock.d.ts +8 -0
- package/lib/Components/Tools/Mocks/ToolPMMock.js +15 -0
- package/lib/Components/Tools/Mocks/index.d.ts +1 -0
- package/lib/Components/Tools/Mocks/index.js +13 -0
- package/lib/Components/Tools/PM/ToolPM.d.ts +16 -4
- package/lib/Components/Tools/PM/ToolPM.js +28 -21
- package/lib/Components/Tools/index.d.ts +3 -1
- package/lib/Components/Tools/index.js +3 -1
- package/lib/Components/TouchController/Entities/TouchInput.d.ts +1 -0
- package/lib/Components/TouchController/Entities/TouchInput.js +34 -0
- package/lib/Components/TouchController/Mock/index.d.ts +2 -0
- package/lib/Components/TouchController/Mock/index.js +14 -0
- package/lib/Components/TouchController/index.d.ts +1 -0
- package/lib/Components/TouchController/index.js +1 -0
- package/lib/Components/Transform3D/Adapters/canBeStuckAdapter.d.ts +2 -0
- package/lib/Components/Transform3D/Adapters/canBeStuckAdapter.js +23 -0
- package/lib/Components/Transform3D/Adapters/index.d.ts +2 -0
- package/lib/Components/Transform3D/Adapters/index.js +14 -0
- package/lib/Components/Transform3D/Adapters/transform3dAdapter.d.ts +3 -0
- package/lib/Components/Transform3D/Adapters/transform3dAdapter.js +23 -0
- package/lib/Components/Transform3D/Entities/Transform3D.d.ts +2 -1
- package/lib/Components/Transform3D/Entities/Transform3D.js +4 -0
- package/lib/Components/Transform3D/Mocks/CanBeStuckPmMock.d.ts +7 -0
- package/lib/Components/Transform3D/Mocks/CanBeStuckPmMock.js +11 -0
- package/lib/Components/Transform3D/Mocks/Transform3dPmMock.d.ts +7 -0
- package/lib/Components/Transform3D/Mocks/Transform3dPmMock.js +11 -0
- package/lib/Components/Transform3D/Mocks/index.d.ts +2 -0
- package/lib/Components/Transform3D/Mocks/index.js +2 -0
- package/lib/Components/Transform3D/PM/Transform3DPM.d.ts +1 -0
- package/lib/Components/Transform3D/PM/Transform3DPM.js +6 -13
- package/lib/Components/Transform3D/index.d.ts +1 -0
- package/lib/Components/Transform3D/index.js +1 -0
- package/lib/Components/UndoRedo/Mocks/MockUndoRedo.d.ts +2 -0
- package/lib/Components/UndoRedo/Mocks/MockUndoRedo.js +5 -1
- package/lib/Components/UndoRedo/Mocks/index.d.ts +1 -0
- package/lib/Components/UndoRedo/Mocks/index.js +13 -0
- package/lib/Components/UndoRedo/index.d.ts +1 -0
- package/lib/Components/UndoRedo/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LabelPM = void 0;
|
|
3
|
+
exports.makeLabelPM = exports.LabelPM = exports.defaultLabelVM = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const
|
|
5
|
+
const LabelEntity_1 = require("../Entities/LabelEntity");
|
|
6
|
+
exports.defaultLabelVM = {
|
|
7
|
+
customLabel: "",
|
|
8
|
+
defaultLabel: "",
|
|
9
|
+
displayLabel: "",
|
|
10
|
+
hasCustomLabel: false,
|
|
11
|
+
labelValidation: null,
|
|
12
|
+
};
|
|
6
13
|
class LabelPM extends AppObject_1.AppObjectPM {
|
|
14
|
+
static getForID(appObjID, appObjects) {
|
|
15
|
+
const appObj = appObjects.get(appObjID);
|
|
16
|
+
if (appObj === undefined) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return appObj.getComponent(LabelPM.type);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.LabelPM = LabelPM;
|
|
23
|
+
LabelPM.type = "LabelPM";
|
|
24
|
+
function makeLabelPM(appObject) {
|
|
25
|
+
return new LabelPMImp(appObject);
|
|
26
|
+
}
|
|
27
|
+
exports.makeLabelPM = makeLabelPM;
|
|
28
|
+
class LabelPMImp extends LabelPM {
|
|
7
29
|
constructor(appObject) {
|
|
8
30
|
super(appObject, LabelPM.type);
|
|
9
31
|
this.onLabelChange = () => {
|
|
10
32
|
if (!this.label)
|
|
11
33
|
return;
|
|
12
|
-
const { custom: customLabel, display: displayLabel, hasCustomLabel,
|
|
34
|
+
const { custom: customLabel, display: displayLabel, hasCustomLabel, customLabelValidationMessage: labelValidation, default: defaultLabel, } = this.label;
|
|
13
35
|
const vm = {
|
|
14
36
|
customLabel,
|
|
15
37
|
displayLabel,
|
|
@@ -25,7 +47,7 @@ class LabelPM extends AppObject_1.AppObjectPM {
|
|
|
25
47
|
(_a = this.label) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onLabelChange);
|
|
26
48
|
(_b = this.label) === null || _b === void 0 ? void 0 : _b.removeOnDisposeObserver(this.dispose);
|
|
27
49
|
};
|
|
28
|
-
this.label =
|
|
50
|
+
this.label = LabelEntity_1.LabelEntity.get(appObject);
|
|
29
51
|
if (this.label) {
|
|
30
52
|
this.label.addChangeObserver(this.onLabelChange);
|
|
31
53
|
this.label.addOnDisposeObserver(this.dispose);
|
|
@@ -43,20 +65,4 @@ class LabelPM extends AppObject_1.AppObjectPM {
|
|
|
43
65
|
// Note the rest of the VM is derived from these two values
|
|
44
66
|
return true;
|
|
45
67
|
}
|
|
46
|
-
static getForID(appObjID, appObjects) {
|
|
47
|
-
const appObj = appObjects.get(appObjID);
|
|
48
|
-
if (appObj === undefined) {
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
return appObj.getComponent(LabelPM.type);
|
|
52
|
-
}
|
|
53
68
|
}
|
|
54
|
-
exports.LabelPM = LabelPM;
|
|
55
|
-
LabelPM.type = "LabelPM";
|
|
56
|
-
LabelPM.defaultVM = {
|
|
57
|
-
customLabel: "",
|
|
58
|
-
defaultLabel: "",
|
|
59
|
-
displayLabel: "",
|
|
60
|
-
hasCustomLabel: false,
|
|
61
|
-
labelValidation: null,
|
|
62
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
2
|
export declare class ClearCustomLabelUC extends AppObjectUC {
|
|
3
3
|
static readonly type = "ClearCustomLabelUC";
|
|
4
|
-
private label
|
|
4
|
+
private get label();
|
|
5
5
|
clearCustomLabel: () => void;
|
|
6
6
|
constructor(appObject: AppObject);
|
|
7
7
|
static get(appObj: AppObject): ClearCustomLabelUC | undefined;
|
|
@@ -20,10 +20,9 @@ class ClearCustomLabelUC extends AppObject_1.AppObjectUC {
|
|
|
20
20
|
new ClearCustomLabelUndoRedo_1.ClearCustomLabelUndoRedo(prevLabel, this.appObject);
|
|
21
21
|
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
23
|
+
}
|
|
24
|
+
get label() {
|
|
25
|
+
return this.getCachedLocalComponent(Entities_1.LabelEntity.type);
|
|
27
26
|
}
|
|
28
27
|
static get(appObj) {
|
|
29
28
|
return appObj.getComponent(this.type);
|
|
@@ -20,7 +20,7 @@ class ClearCustomLabelUndoRedo {
|
|
|
20
20
|
this.label.custom = "";
|
|
21
21
|
Dispatcher_1.dispatchStateChange(this.appObject.appObjectRepo);
|
|
22
22
|
};
|
|
23
|
-
this.label = Entities_1.
|
|
23
|
+
this.label = Entities_1.LabelEntity.get(appObject);
|
|
24
24
|
if (!this.label) {
|
|
25
25
|
appObject.appObjectRepo.submitWarning("ClearCustomLabelUndoRedo", "Unable to find LabelEntity");
|
|
26
26
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
2
|
export declare class SetCustomLabelUC extends AppObjectUC {
|
|
3
3
|
static readonly type = "SetCustomLabelUC";
|
|
4
|
-
private label
|
|
4
|
+
private get label();
|
|
5
5
|
setCustomLabel: (customLabel: string) => void;
|
|
6
6
|
constructor(appObject: AppObject);
|
|
7
7
|
static get(appObj: AppObject): SetCustomLabelUC | undefined;
|
|
@@ -18,10 +18,9 @@ class SetCustomLabelUC extends AppObject_1.AppObjectUC {
|
|
|
18
18
|
new SetCustomLabelUndoRedo_1.SetCustomLabelUndoRedo(prevLabel, customLabel, this.appObject);
|
|
19
19
|
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
}
|
|
22
|
+
get label() {
|
|
23
|
+
return this.getCachedLocalComponent(Entities_1.LabelEntity.type);
|
|
25
24
|
}
|
|
26
25
|
static get(appObj) {
|
|
27
26
|
return appObj.getComponent(this.type);
|
|
@@ -21,7 +21,7 @@ class SetCustomLabelUndoRedo {
|
|
|
21
21
|
this.label.custom = this.curLabel;
|
|
22
22
|
Dispatcher_1.dispatchStateChange(this.appObject.appObjectRepo);
|
|
23
23
|
};
|
|
24
|
-
this.label = Entities_1.
|
|
24
|
+
this.label = Entities_1.LabelEntity.get(appObject);
|
|
25
25
|
if (!this.label) {
|
|
26
26
|
appObject.appObjectRepo.submitWarning("SetCustomLabelUndoRedo", "Unable to find LabelEntity");
|
|
27
27
|
return;
|
|
@@ -10,7 +10,9 @@ 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);
|
|
14
|
+
__exportStar(require("./Controller"), exports);
|
|
13
15
|
__exportStar(require("./Entities"), exports);
|
|
16
|
+
__exportStar(require("./Mocks"), exports);
|
|
14
17
|
__exportStar(require("./PM"), exports);
|
|
15
|
-
__exportStar(require("./Controller"), exports);
|
|
16
18
|
__exportStar(require("./UC"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppObject, AppObjectEntity } from "../../../AppObject";
|
|
2
2
|
import { Quaternion, QuaternionDTO, Vector3, Vector3DTO } from "../../../ValueObjects";
|
|
3
3
|
import { Hideable } from "../../Hideable";
|
|
4
|
-
import {
|
|
4
|
+
import { LabelEntity } from "../../Label";
|
|
5
5
|
import { OverlayColor, OverlayColorEnums } from "../../OverlayColor";
|
|
6
6
|
import { Selectable } from "../../Selection";
|
|
7
7
|
import { Transform3D } from "../../Transform3D";
|
|
@@ -25,7 +25,7 @@ export declare abstract class LandmarkEntity extends AppObjectEntity {
|
|
|
25
25
|
abstract get size(): number;
|
|
26
26
|
abstract set size(val: number);
|
|
27
27
|
abstract readonly parentID: string;
|
|
28
|
-
abstract get label():
|
|
28
|
+
abstract get label(): LabelEntity;
|
|
29
29
|
abstract get transform(): Transform3D;
|
|
30
30
|
abstract get hideable(): Hideable;
|
|
31
31
|
abstract get overlayColor(): OverlayColor;
|
|
@@ -28,7 +28,7 @@ class LandmarkImp extends LandmarkEntity {
|
|
|
28
28
|
super(appObject, LandmarkEntity.type);
|
|
29
29
|
this.memoizedSize = new Entities_1.MemoizedNumber(1, this.notifyOnChange);
|
|
30
30
|
this.parentID = parentID;
|
|
31
|
-
this._label = Label_1.
|
|
31
|
+
this._label = Label_1.LabelEntity.addIfMissing(appObject);
|
|
32
32
|
this._label.addChangeObserver(this.notifyOnChange);
|
|
33
33
|
this._transform = Transform3D_1.Transform3D.addIfMissing(appObject);
|
|
34
34
|
this._transform.addChangeObserver(this.notifyOnChange);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppObject } from "../../../AppObject";
|
|
2
2
|
import { Quaternion, Vector3 } from "../../../ValueObjects";
|
|
3
3
|
import { Hideable } from "../../Hideable";
|
|
4
|
-
import {
|
|
4
|
+
import { LabelEntity } from "../../Label";
|
|
5
5
|
import { OverlayColor } from "../../OverlayColor";
|
|
6
6
|
import { Selectable } from "../../Selection";
|
|
7
7
|
import { Transform3D } from "../../Transform3D";
|
|
@@ -12,7 +12,7 @@ export declare class MockLandmark extends LandmarkEntity {
|
|
|
12
12
|
get size(): number;
|
|
13
13
|
set size(val: number);
|
|
14
14
|
parentID: string;
|
|
15
|
-
get label():
|
|
15
|
+
get label(): LabelEntity;
|
|
16
16
|
get transform(): Transform3D;
|
|
17
17
|
get hideable(): Hideable;
|
|
18
18
|
get overlayColor(): OverlayColor;
|
|
@@ -28,7 +28,7 @@ class AddLandmarkUCImp extends AddLandmarkUC {
|
|
|
28
28
|
this.warn("Transform3D App Object has not been added. Add to the Transform3D App Object before Adding Landmark.");
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
this.label = appObject.getComponent(Label_1.
|
|
31
|
+
this.label = appObject.getComponent(Label_1.LabelEntity.type); // Not required
|
|
32
32
|
}
|
|
33
33
|
addFromData(data) {
|
|
34
34
|
if (!this.landmarkRepo || !this.transform3D)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "../../../AppObject";
|
|
2
|
-
import { SerializedSystem } from "../../StateMachine";
|
|
2
|
+
import { SerializedSystem } from "../../StateMachine/Entities";
|
|
3
3
|
import { LandmarkDTO } from "../Entities/LandmarkEntity";
|
|
4
4
|
export declare class SerializeLandmarks extends AppObjectUC implements SerializedSystem {
|
|
5
5
|
static readonly type = "SerializeLandmarks";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SerializeLandmarks = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const Entities_1 = require("../../Enablement/Entities");
|
|
6
|
+
const Entities_2 = require("../../StateMachine/Entities");
|
|
7
7
|
const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
|
|
8
8
|
const LandmarkGlobals_1 = require("../Entities/LandmarkGlobals");
|
|
9
9
|
const LandmarkRepo_1 = require("../Entities/LandmarkRepo");
|
|
@@ -13,7 +13,7 @@ class SerializeLandmarks extends AppObject_1.AppObjectUC {
|
|
|
13
13
|
super(appObj, SerializeLandmarks.type);
|
|
14
14
|
this.name = "landmarks";
|
|
15
15
|
this.seriliziationVersion = 1;
|
|
16
|
-
const stateMachine = this.appObjects.getSingleton(
|
|
16
|
+
const stateMachine = this.appObjects.getSingleton(Entities_2.StateMachineEntity.type);
|
|
17
17
|
if (stateMachine) {
|
|
18
18
|
stateMachine.registerSerializedSystem(this);
|
|
19
19
|
}
|
|
@@ -25,7 +25,7 @@ class SerializeLandmarks extends AppObject_1.AppObjectUC {
|
|
|
25
25
|
const repos = this.appObjects.getAllComponents(LandmarkRepo_1.LandmarkRepo.type);
|
|
26
26
|
const landmarks = [];
|
|
27
27
|
repos.forEach((repo) => {
|
|
28
|
-
const enabledEntity = repo.appObject.getComponent(
|
|
28
|
+
const enabledEntity = repo.appObject.getComponent(Entities_1.EnablementEntity.type);
|
|
29
29
|
let enabled = false;
|
|
30
30
|
if (enabledEntity) {
|
|
31
31
|
enabled = enabledEntity.enabled;
|
|
@@ -46,7 +46,7 @@ class TryAddNewLandmarkUCImp extends TryAddNewLandmarkUC {
|
|
|
46
46
|
newLandmark.size = globals.lastSize;
|
|
47
47
|
newLandmark.overlayColor.overlayColor = globals.lastColor;
|
|
48
48
|
}
|
|
49
|
-
const label = this.appObjects.getAppObjectComponent(pickAO, Label_1.
|
|
49
|
+
const label = this.appObjects.getAppObjectComponent(pickAO, Label_1.LabelEntity.type);
|
|
50
50
|
newLandmark.label.default = label ? label.default : "";
|
|
51
51
|
newLandmark.selectable.selected = true;
|
|
52
52
|
new AddLandmarkUndoRedo_1.AddLandmarkUndoRedo(newLandmark.data, this.appObject);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./overlayColorAdapter";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./overlayColorAdapter"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.overlayColorAdapter = void 0;
|
|
4
|
+
const Entities_1 = require("../Entities");
|
|
5
|
+
const OverlayColorPM_1 = require("../PM/OverlayColorPM");
|
|
6
|
+
exports.overlayColorAdapter = {
|
|
7
|
+
defaultVM: Entities_1.OverlayColorEnums.NONE,
|
|
8
|
+
subscribe: (id, appObjects, setVM) => {
|
|
9
|
+
const pm = OverlayColorPM_1.OverlayColorPM.getForID(id, appObjects);
|
|
10
|
+
if (!pm) {
|
|
11
|
+
appObjects.submitError("overlayColorAdapter", "Unable to find OverlayColorPM");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
pm.addView(setVM);
|
|
15
|
+
},
|
|
16
|
+
unsubscribe: (id, appObjects, setVM) => {
|
|
17
|
+
const pm = OverlayColorPM_1.OverlayColorPM.getForID(id, appObjects);
|
|
18
|
+
if (!pm) {
|
|
19
|
+
appObjects.submitError("overlayColorAdapter", "Unable to find OverlayColorPM");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
pm.removeView(setVM);
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppObject, AppObjectEntity } from "../../../AppObject";
|
|
1
|
+
import { AppObject, AppObjectEntity, AppObjectRepo } from "../../../AppObject";
|
|
2
2
|
import { Color } from "../../../ValueObjects";
|
|
3
3
|
export declare enum OverlayColorEnums {
|
|
4
4
|
GREEN = "Green",
|
|
@@ -18,6 +18,7 @@ export declare class OverlayColor extends AppObjectEntity {
|
|
|
18
18
|
static overlayColorEnumToColor(colorEnum: OverlayColorEnums): Color | undefined;
|
|
19
19
|
static addIfMissing(appObj: AppObject): OverlayColor;
|
|
20
20
|
static get(appObj: AppObject): OverlayColor | undefined;
|
|
21
|
+
static getByID(id: string, appObjects: AppObjectRepo): OverlayColor | undefined;
|
|
21
22
|
private memoizedColor;
|
|
22
23
|
get overlayColor(): OverlayColorEnums;
|
|
23
24
|
set overlayColor(val: OverlayColorEnums);
|
|
@@ -37,6 +37,10 @@ class OverlayColor extends AppObject_1.AppObjectEntity {
|
|
|
37
37
|
static get(appObj) {
|
|
38
38
|
return appObj.getComponent(this.type);
|
|
39
39
|
}
|
|
40
|
+
static getByID(id, appObjects) {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = appObjects.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(this.type);
|
|
43
|
+
}
|
|
40
44
|
get overlayColor() {
|
|
41
45
|
return this.memoizedColor.val;
|
|
42
46
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { OverlayColorPM } from "../PM/OverlayColorPM";
|
|
4
|
+
export declare class OverlayColorPMMock extends OverlayColorPM {
|
|
5
|
+
vmsAreEqual: jest.Mock<any, any>;
|
|
6
|
+
constructor(appObject: AppObject);
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OverlayColorPMMock = void 0;
|
|
4
|
+
const OverlayColorPM_1 = require("../PM/OverlayColorPM");
|
|
5
|
+
class OverlayColorPMMock extends OverlayColorPM_1.OverlayColorPM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, OverlayColorPM_1.OverlayColorPM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.OverlayColorPMMock = OverlayColorPMMock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./OverlayColorPMMock";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./OverlayColorPMMock"), exports);
|
|
@@ -2,12 +2,8 @@ import { AppObject } from "../../../AppObject/AppObject";
|
|
|
2
2
|
import { AppObjectPM } from "../../../AppObject/AppObjectPM";
|
|
3
3
|
import { AppObjectRepo } from "../../../AppObject/AppObjectRepo";
|
|
4
4
|
import { OverlayColorEnums } from "../Entities/OverlayColor";
|
|
5
|
-
export declare class OverlayColorPM extends AppObjectPM<OverlayColorEnums> {
|
|
5
|
+
export declare abstract class OverlayColorPM extends AppObjectPM<OverlayColorEnums> {
|
|
6
6
|
static readonly type = "OverlayColorPM";
|
|
7
|
-
private overlayColor?;
|
|
8
|
-
onColorChange: () => void;
|
|
9
|
-
vmsAreEqual(a: OverlayColorEnums, b: OverlayColorEnums): boolean;
|
|
10
|
-
dispose: () => void;
|
|
11
|
-
constructor(appObject: AppObject);
|
|
12
7
|
static getForID(appObjID: string, appObjects: AppObjectRepo): OverlayColorPM | undefined;
|
|
13
8
|
}
|
|
9
|
+
export declare function makeOverlayColorPM(appObject: AppObject): OverlayColorPM;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OverlayColorPM = void 0;
|
|
3
|
+
exports.makeOverlayColorPM = exports.OverlayColorPM = void 0;
|
|
4
4
|
const AppObjectPM_1 = require("../../../AppObject/AppObjectPM");
|
|
5
5
|
const OverlayColor_1 = require("../Entities/OverlayColor");
|
|
6
6
|
class OverlayColorPM extends AppObjectPM_1.AppObjectPM {
|
|
7
|
+
static getForID(appObjID, appObjects) {
|
|
8
|
+
const appObj = appObjects.get(appObjID);
|
|
9
|
+
if (appObj === undefined) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
return appObj.getComponent(OverlayColorPM.type);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.OverlayColorPM = OverlayColorPM;
|
|
16
|
+
OverlayColorPM.type = "OverlayColorPM";
|
|
17
|
+
function makeOverlayColorPM(appObject) {
|
|
18
|
+
return new OverlayColorPMImp(appObject);
|
|
19
|
+
}
|
|
20
|
+
exports.makeOverlayColorPM = makeOverlayColorPM;
|
|
21
|
+
class OverlayColorPMImp extends OverlayColorPM {
|
|
7
22
|
constructor(appObject) {
|
|
8
23
|
super(appObject, OverlayColorPM.type);
|
|
9
24
|
this.onColorChange = () => {
|
|
@@ -17,9 +32,8 @@ class OverlayColorPM extends AppObjectPM_1.AppObjectPM {
|
|
|
17
32
|
(_a = this.overlayColor) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onColorChange);
|
|
18
33
|
(_b = this.overlayColor) === null || _b === void 0 ? void 0 : _b.removeOnDisposeObserver(this.dispose);
|
|
19
34
|
};
|
|
20
|
-
this.overlayColor = OverlayColor_1.OverlayColor.get(appObject);
|
|
21
35
|
if (!this.overlayColor) {
|
|
22
|
-
this.
|
|
36
|
+
this.error("[OverlayColorPM] Unable to find OverlayColor Entity");
|
|
23
37
|
return;
|
|
24
38
|
}
|
|
25
39
|
else {
|
|
@@ -28,16 +42,10 @@ class OverlayColorPM extends AppObjectPM_1.AppObjectPM {
|
|
|
28
42
|
this.onColorChange();
|
|
29
43
|
}
|
|
30
44
|
}
|
|
45
|
+
get overlayColor() {
|
|
46
|
+
return this.getCachedLocalComponent(OverlayColor_1.OverlayColor.type);
|
|
47
|
+
}
|
|
31
48
|
vmsAreEqual(a, b) {
|
|
32
49
|
return a === b;
|
|
33
50
|
}
|
|
34
|
-
static getForID(appObjID, appObjects) {
|
|
35
|
-
const appObj = appObjects.get(appObjID);
|
|
36
|
-
if (appObj === undefined) {
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
return appObj.getComponent(OverlayColorPM.type);
|
|
40
|
-
}
|
|
41
51
|
}
|
|
42
|
-
exports.OverlayColorPM = OverlayColorPM;
|
|
43
|
-
OverlayColorPM.type = "OverlayColorPM";
|
|
@@ -10,7 +10,9 @@ 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);
|
|
14
|
+
__exportStar(require("./Controller"), exports);
|
|
13
15
|
__exportStar(require("./Entities"), exports);
|
|
16
|
+
__exportStar(require("./Mocks"), exports);
|
|
14
17
|
__exportStar(require("./PM"), exports);
|
|
15
|
-
__exportStar(require("./Controller"), exports);
|
|
16
18
|
__exportStar(require("./UC"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./selectableStateAdapter"), exports);
|
|
14
|
+
__exportStar(require("./selectedObjectAdapter"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.selectableStateAdapter = void 0;
|
|
4
|
+
const SelectableStatePM_1 = require("../PM/SelectableStatePM");
|
|
5
|
+
exports.selectableStateAdapter = {
|
|
6
|
+
defaultVM: SelectableStatePM_1.defaultSelectableStateVM,
|
|
7
|
+
subscribe: (id, appObjects, setVM) => {
|
|
8
|
+
const pm = SelectableStatePM_1.SelectableStatePM.get(id, appObjects);
|
|
9
|
+
if (!pm) {
|
|
10
|
+
appObjects.submitError("selectableStateAdapter", "Unable to find SelectableStatePM");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
pm.addView(setVM);
|
|
14
|
+
},
|
|
15
|
+
unsubscribe: (id, appObjects, setVM) => {
|
|
16
|
+
const pm = SelectableStatePM_1.SelectableStatePM.get(id, appObjects);
|
|
17
|
+
if (!pm) {
|
|
18
|
+
appObjects.submitError("selectableStateAdapter", "Unable to find SelectableStatePM");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
pm.removeView(setVM);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.selectedObjectAdapter = void 0;
|
|
4
|
+
const SelectedObjectPM_1 = require("../PM/SelectedObjectPM");
|
|
5
|
+
exports.selectedObjectAdapter = {
|
|
6
|
+
defaultVM: null,
|
|
7
|
+
subscribe: (appObjects, setVM) => {
|
|
8
|
+
const pm = SelectedObjectPM_1.SelectedObjectPM.get(appObjects);
|
|
9
|
+
if (!pm) {
|
|
10
|
+
appObjects.submitError("selectedObjectAdapter", "Unable to find SelectedObjectPM");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
pm.addView(setVM);
|
|
14
|
+
},
|
|
15
|
+
unsubscribe: (appObjects, setVM) => {
|
|
16
|
+
const pm = SelectedObjectPM_1.SelectedObjectPM.get(appObjects);
|
|
17
|
+
if (!pm) {
|
|
18
|
+
appObjects.submitError("selectedObjectAdapter", "Unable to find SelectedObjectPM");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
pm.removeView(setVM);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -21,7 +21,7 @@ class MouseHoverOnAppObject extends AppObjectController_1.AppObjectController {
|
|
|
21
21
|
if (!this.allow(e))
|
|
22
22
|
return;
|
|
23
23
|
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
24
|
-
this.hoverUC.
|
|
24
|
+
this.hoverUC.tryHoverAppObject(ray);
|
|
25
25
|
};
|
|
26
26
|
this.zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
27
27
|
this.hoverUC = appObject.getComponent(HoverAppObjectUC_1.HoverAppObjectUC.type);
|
|
@@ -34,7 +34,7 @@ class MousePressOnAppObject extends AppObjectController_1.AppObjectController {
|
|
|
34
34
|
this.endPosition = this.startPosition;
|
|
35
35
|
this.isPressed = true;
|
|
36
36
|
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
37
|
-
this.pressedID = (_a = this.pressUC) === null || _a === void 0 ? void 0 : _a.
|
|
37
|
+
this.pressedID = (_a = this.pressUC) === null || _a === void 0 ? void 0 : _a.tryPressAppObject(ray);
|
|
38
38
|
};
|
|
39
39
|
this.onUp = (e) => {
|
|
40
40
|
this.isPressed = false;
|
|
@@ -45,7 +45,7 @@ class MousePressOnAppObject extends AppObjectController_1.AppObjectController {
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
// Set pressedID to null
|
|
48
|
-
this.pressUC.
|
|
48
|
+
this.pressUC.pressAppObject(this.pressedID, this.isPressed);
|
|
49
49
|
};
|
|
50
50
|
this.onMove = (e) => {
|
|
51
51
|
if (!this.pressUC) {
|
|
@@ -57,7 +57,7 @@ class MousePressOnAppObject extends AppObjectController_1.AppObjectController {
|
|
|
57
57
|
.magnitued;
|
|
58
58
|
if (movement > MousePressOnAppObject.maxTapDistancePx) {
|
|
59
59
|
// Set pressedID to null
|
|
60
|
-
this.pressUC.
|
|
60
|
+
this.pressUC.pressAppObject(null, this.isPressed);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
};
|
|
@@ -25,7 +25,7 @@ class MouseSelectAppObject extends AppObjectController_1.AppObjectController {
|
|
|
25
25
|
if (!this.allow(e))
|
|
26
26
|
return;
|
|
27
27
|
const ray = Babylon_1.pixelToSceneRay(e.position, this.appObjects);
|
|
28
|
-
this.selectUC.
|
|
28
|
+
this.selectUC.trySelectAppObject(ray);
|
|
29
29
|
};
|
|
30
30
|
this.zSpaceEntity = ZSpaceEntity_1.ZSpaceEntity.get(this.appObjects);
|
|
31
31
|
this.selectUC = appObject.getComponent(SelectAppObjectUC_1.SelectAppObjectUC.type);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
|
+
import { AppObjectController } from "../../../AppObject/AppObjectController";
|
|
3
|
+
import { StylusController } from "../../Stylus";
|
|
4
|
+
export declare class StylusHoverOnAppObjectSC extends AppObjectController implements StylusController {
|
|
5
|
+
static readonly type = "StylusHoverOnAppObjectSC";
|
|
6
|
+
private stylus?;
|
|
7
|
+
private hoverUC?;
|
|
8
|
+
allow: () => boolean;
|
|
9
|
+
onStylusMove: () => void;
|
|
10
|
+
constructor(appObject: AppObject);
|
|
11
|
+
}
|