@vived/app 4.11.0 → 4.11.1
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.
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSingletonComponent = void 0;
|
|
4
4
|
function getSingletonComponent(type, appObjects) {
|
|
5
|
-
|
|
6
|
-
if (components.length === 0) {
|
|
7
|
-
appObjects.submitWarning("HasStoredViewPM", `Unable to find component ${type}. Add one on Mount`);
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
else if (components.length > 1) {
|
|
11
|
-
appObjects.submitWarning("HasStoredViewPM", `Multiple ${type} found. There should only be one. Using the first one`);
|
|
12
|
-
}
|
|
13
|
-
return components[0];
|
|
5
|
+
return appObjects.getSingleton(type);
|
|
14
6
|
}
|
|
15
7
|
exports.getSingletonComponent = getSingletonComponent;
|
|
@@ -6,15 +6,7 @@ const Dispatcher_1 = require("../../Dispatcher");
|
|
|
6
6
|
const HoverLabel_1 = require("../Entities/HoverLabel");
|
|
7
7
|
class ToggleAllowHoverLabelUC extends AppObject_1.AppObjectUC {
|
|
8
8
|
static get(appObjects) {
|
|
9
|
-
|
|
10
|
-
if (ucs.length === 0) {
|
|
11
|
-
console.warn("Unable to find a ToggleAllowHoverLabelUC. Add one on Mount");
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
else if (ucs.length > 1) {
|
|
15
|
-
console.warn("Multiple ToggleAllowHoverLabelUC have been found. There should only be one. Using the first one");
|
|
16
|
-
}
|
|
17
|
-
return ucs[0];
|
|
9
|
+
return AppObject_1.getSingletonComponent(ToggleAllowHoverLabelUC.type, appObjects);
|
|
18
10
|
}
|
|
19
11
|
}
|
|
20
12
|
exports.ToggleAllowHoverLabelUC = ToggleAllowHoverLabelUC;
|
|
@@ -29,7 +21,8 @@ class ToggleAllowHoverLabelIMP extends ToggleAllowHoverLabelUC {
|
|
|
29
21
|
this.toggleAllowHoverLabel = () => {
|
|
30
22
|
if (!this.hoverLabelEntity)
|
|
31
23
|
return;
|
|
32
|
-
this.hoverLabelEntity.allowHoverLabel = !this.hoverLabelEntity
|
|
24
|
+
this.hoverLabelEntity.allowHoverLabel = !this.hoverLabelEntity
|
|
25
|
+
.allowHoverLabel;
|
|
33
26
|
Dispatcher_1.dispatchStateChange(this.appObjects);
|
|
34
27
|
};
|
|
35
28
|
this.hoverLabelEntity = this.appObject.getComponent(HoverLabel_1.HoverLabelEntity.type);
|