@vived/app 4.35.1 → 4.35.2
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/FramedScreen/Factories/setupStandardFramedScreen.d.ts +10 -0
- package/lib/Components/Landmarks/Entities/LandmarkEntity.js +1 -1
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.js +3 -2
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +7 -1
- package/package.json +1 -1
|
@@ -7,7 +7,17 @@ export declare const LOWER_LETTERBOX_FRAMED_CONTAINER_ID = "lowerLetterBox";
|
|
|
7
7
|
export declare const UPPER_LETTERBOX_FRAMED_CONTAINER_ID = "upperLetterBox";
|
|
8
8
|
export declare const LEFT_LETTERBOX_FRAMED_CONTAINER_ID = "leftLetterBox";
|
|
9
9
|
export declare const RIGHT_LETTERBOX_FRAMED_CONTAINER_ID = "rightLetterBox";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for setting up a standard framed screen layout.
|
|
12
|
+
* Controls the initialization behavior of the screen layout system.
|
|
13
|
+
*/
|
|
10
14
|
export interface StandardFramedScreenOptions {
|
|
15
|
+
/**
|
|
16
|
+
* When true, prevents the automatic setup of the standard layout hook.
|
|
17
|
+
* Use this when you need to implement custom layout behavior instead
|
|
18
|
+
* of the default standard layout.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
11
21
|
dontSetupLayoutHook?: boolean;
|
|
12
22
|
}
|
|
13
23
|
export declare function setupStandardFramedScreen(appObjects: AppObjectRepo, options?: StandardFramedScreenOptions): AppObject;
|
|
@@ -26,7 +26,7 @@ exports.makeLandmarkEntity = makeLandmarkEntity;
|
|
|
26
26
|
class LandmarkImp extends LandmarkEntity {
|
|
27
27
|
constructor(appObject) {
|
|
28
28
|
super(appObject, LandmarkEntity.type);
|
|
29
|
-
this.memoizedSize = new Entities_1.MemoizedNumber(
|
|
29
|
+
this.memoizedSize = new Entities_1.MemoizedNumber(0, this.notifyOnChange);
|
|
30
30
|
this._label = Label_1.LabelEntity.addIfMissing(appObject);
|
|
31
31
|
this._label.addChangeObserver(this.notifyOnChange);
|
|
32
32
|
this._transform = Transform3D_1.Transform3D.addIfMissing(appObject);
|
|
@@ -42,7 +42,7 @@ class SetLandmarkSizeUCImp extends SetLandmarkSizeUC {
|
|
|
42
42
|
this.landmark.size = size;
|
|
43
43
|
}
|
|
44
44
|
submitSize(size) {
|
|
45
|
-
if (
|
|
45
|
+
if (this.initialValue === undefined)
|
|
46
46
|
return;
|
|
47
47
|
if (!this.landmark)
|
|
48
48
|
return;
|
|
@@ -50,7 +50,8 @@ class SetLandmarkSizeUCImp extends SetLandmarkSizeUC {
|
|
|
50
50
|
return;
|
|
51
51
|
this.landmark.size = size;
|
|
52
52
|
this.landmarkGlobals.lastSize = size;
|
|
53
|
-
if (this.initialValue
|
|
53
|
+
if (this.initialValue !== undefined &&
|
|
54
|
+
this.initialValue !== this.landmark.size) {
|
|
54
55
|
new SetLandmarkSizeUndoRedo_1.SetLandmarkSizeUndoRedo({
|
|
55
56
|
landmark: this.landmark,
|
|
56
57
|
redoSize: this.landmark.size,
|
|
@@ -6,6 +6,7 @@ const ValueObjects_1 = require("../../../ValueObjects");
|
|
|
6
6
|
const Babylon_1 = require("../../Babylon");
|
|
7
7
|
const Dispatcher_1 = require("../../Dispatcher");
|
|
8
8
|
const Label_1 = require("../../Label");
|
|
9
|
+
const Selection_1 = require("../../Selection/Entities/Selection");
|
|
9
10
|
const Tools_1 = require("../../Tools");
|
|
10
11
|
const Entities_1 = require("../Entities");
|
|
11
12
|
const LandmarkGlobals_1 = require("../Entities/LandmarkGlobals");
|
|
@@ -28,6 +29,9 @@ class TryAddNewLandmarkUCImp extends TryAddNewLandmarkUC {
|
|
|
28
29
|
get toolRepo() {
|
|
29
30
|
return this.getCachedSingleton(Tools_1.ToolRepository.type);
|
|
30
31
|
}
|
|
32
|
+
get selection() {
|
|
33
|
+
return this.getCachedSingleton(Selection_1.Selection.type);
|
|
34
|
+
}
|
|
31
35
|
allow() {
|
|
32
36
|
var _a, _b;
|
|
33
37
|
if (((_b = (_a = this.toolRepo) === null || _a === void 0 ? void 0 : _a.activeTool) === null || _b === void 0 ? void 0 : _b.toolType) === "LANDMARK") {
|
|
@@ -60,7 +64,9 @@ class TryAddNewLandmarkUCImp extends TryAddNewLandmarkUC {
|
|
|
60
64
|
}
|
|
61
65
|
const label = Label_1.LabelEntity.getByID(appObjectID, this.appObjects);
|
|
62
66
|
newLandmark.label.default = label ? label.default : "";
|
|
63
|
-
|
|
67
|
+
if (this.selection && newLandmark) {
|
|
68
|
+
this.selection.selectedObjectId = newLandmark.appObject.id;
|
|
69
|
+
}
|
|
64
70
|
new AddLandmarkUndoRedo_1.AddLandmarkUndoRedo(newLandmark.data, this.appObjects);
|
|
65
71
|
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
66
72
|
return newLandmark;
|