@urso/core 0.8.12 → 0.8.14
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/build/js/index.js +1 -1
- package/package.json +1 -1
- package/src/js/modules/objects/models/button.js +2 -2
- package/src/js/modules/objects/models/checkbox.js +2 -2
- package/src/js/modules/objects/models/hitArea.js +8 -8
- package/src/js/modules/objects/models/slider.js +2 -2
- package/src/js/modules/objects/models/toggle.js +2 -2
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ class ModulesObjectsModelsButton extends ModulesObjectsBaseModel {
|
|
|
36
36
|
this.mouseOverAction = Urso.helper.recursiveGet('mouseOverAction', params, false);
|
|
37
37
|
this.mouseOutAction = Urso.helper.recursiveGet('mouseOutAction', params, false);
|
|
38
38
|
this.noActionOnMouseOut = Urso.helper.recursiveGet('noActionOnMouseOut', params, this._checkIsDesktop());
|
|
39
|
-
this.
|
|
39
|
+
this.handlePointerUpOutside = Urso.helper.recursiveGet('handlePointerUpOutside', params, true);
|
|
40
40
|
|
|
41
41
|
this.buttonFrames = {
|
|
42
42
|
over: Urso.helper.recursiveGet('buttonFrames.over', params, false),
|
|
@@ -109,7 +109,7 @@ class ModulesObjectsModelsButton extends ModulesObjectsBaseModel {
|
|
|
109
109
|
.on('pointerover', this._onButtonOver.bind(this))
|
|
110
110
|
.on('pointerout', this._onButtonOut.bind(this));
|
|
111
111
|
|
|
112
|
-
if (this.
|
|
112
|
+
if (this.handlePointerUpOutside) {
|
|
113
113
|
this._baseObject.on('pointerupoutside', this._onButtonUp.bind(this))
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -28,7 +28,7 @@ class ModulesObjectsModelsCheckbox extends UrsoCoreModulesObjectsModelsToggle {
|
|
|
28
28
|
this.lable = Urso.helper.recursiveGet('lable', params, false);
|
|
29
29
|
|
|
30
30
|
this.defaultStatus = Urso.helper.recursiveGet('defaultStatus', params, 'unpressed'); //pressed or unpressed
|
|
31
|
-
this.
|
|
31
|
+
this.handlePointerUpOutside = Urso.helper.recursiveGet('handlePointerUpOutside', params, true);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
_createCheckbox() {
|
|
@@ -52,7 +52,7 @@ class ModulesObjectsModelsCheckbox extends UrsoCoreModulesObjectsModelsToggle {
|
|
|
52
52
|
.on('pointerover', this._onButtonOver.bind(this))
|
|
53
53
|
.on('pointerout', this._onButtonOut.bind(this));
|
|
54
54
|
|
|
55
|
-
if (this.
|
|
55
|
+
if (this.handlePointerUpOutside) {
|
|
56
56
|
this._baseObject.on('pointerupoutside', this._onButtonUp.bind(this))
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -24,10 +24,10 @@ class ModulesObjectsModelsHitArea extends ModulesObjectsBaseModel {
|
|
|
24
24
|
);
|
|
25
25
|
this.disableRightClick = Urso.helper.recursiveGet('disableRightClick', params, false);
|
|
26
26
|
this.keyDownAction = Urso.helper.recursiveGet('keyDownAction', params, false);
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
27
|
+
this.mouseOverAction = Urso.helper.recursiveGet('mouseOverAction', params, false);
|
|
28
|
+
this.mouseOutAction = Urso.helper.recursiveGet('mouseOutAction', params, false);
|
|
29
29
|
this.onTouchMoveCallback = Urso.helper.recursiveGet('onTouchMoveCallback', params, false);
|
|
30
|
-
this.
|
|
30
|
+
this.handlePointerUpOutside = Urso.helper.recursiveGet('handlePointerUpOutside', params, true);
|
|
31
31
|
/**
|
|
32
32
|
* customInteractionArea object ex:
|
|
33
33
|
* Circle: { "type": "circle", "params": [0, 0, 100] }
|
|
@@ -123,7 +123,7 @@ class ModulesObjectsModelsHitArea extends ModulesObjectsBaseModel {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
_onPressUpOutside() {
|
|
126
|
-
if (this.
|
|
126
|
+
if (this.handlePointerUpOutside) {
|
|
127
127
|
this._onPressUp();
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
@@ -138,16 +138,16 @@ class ModulesObjectsModelsHitArea extends ModulesObjectsBaseModel {
|
|
|
138
138
|
if (this._isDisabled)
|
|
139
139
|
return false;
|
|
140
140
|
|
|
141
|
-
if (this.
|
|
142
|
-
this.
|
|
141
|
+
if (this.mouseOverAction)
|
|
142
|
+
this.mouseOverAction();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
_onOut() {
|
|
146
146
|
if (this._isDisabled)
|
|
147
147
|
return false;
|
|
148
148
|
|
|
149
|
-
if (this.
|
|
150
|
-
this.
|
|
149
|
+
if (this.mouseOutAction)
|
|
150
|
+
this.mouseOutAction();
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
_getEventLocalPosition(event) {
|
|
@@ -36,7 +36,7 @@ class ModulesObjectsModelsSlider extends ModulesObjectsBaseModel {
|
|
|
36
36
|
this.maxValueTextModel = Urso.helper.recursiveGet('maxValueTextModel', params, false);
|
|
37
37
|
this.currentValueTextModel = Urso.helper.recursiveGet('currentValueTextModel', params, false);
|
|
38
38
|
this.isVertical = Urso.helper.recursiveGet('isVertical', params, false);
|
|
39
|
-
this.
|
|
39
|
+
this.handlePointerUpOutside = Urso.helper.recursiveGet('handlePointerUpOutside', params, true);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -147,7 +147,7 @@ class ModulesObjectsModelsSlider extends ModulesObjectsBaseModel {
|
|
|
147
147
|
.on('pointerupoutside', this._onPointerUp.bind(this))
|
|
148
148
|
.on('touchmove', this._onTouchmove.bind(this));
|
|
149
149
|
|
|
150
|
-
if (this.
|
|
150
|
+
if (this.handlePointerUpOutside) {
|
|
151
151
|
this._baseObject.on('pointerupoutside', this._onPointerUp.bind(this))
|
|
152
152
|
}
|
|
153
153
|
};
|
|
@@ -31,7 +31,7 @@ class ModulesObjectsModelsToggle extends UrsoCoreModulesObjectsModelsButton {
|
|
|
31
31
|
unpressedDisabled: Urso.helper.recursiveGet('buttonFrames.unpressedDisabled', params, false),
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
this.
|
|
34
|
+
this.handlePointerUpOutside = Urso.helper.recursiveGet('handlePointerUpOutside', params, true);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
setButtonFrame(key, assetKey) {
|
|
@@ -90,7 +90,7 @@ class ModulesObjectsModelsToggle extends UrsoCoreModulesObjectsModelsButton {
|
|
|
90
90
|
.on('pointerover', this._onButtonOver.bind(this))
|
|
91
91
|
.on('pointerout', this._onButtonOut.bind(this));
|
|
92
92
|
|
|
93
|
-
if (this.
|
|
93
|
+
if (this.handlePointerUpOutside) {
|
|
94
94
|
this._baseObject.on('pointerupoutside', this._onButtonUp.bind(this))
|
|
95
95
|
}
|
|
96
96
|
};
|