@urso/core 0.5.6 → 0.5.7
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/package.json
CHANGED
|
@@ -16,8 +16,6 @@ class ModulesObjectsModelsBitmapText extends Urso.Core.Modules.Objects.BaseModel
|
|
|
16
16
|
|
|
17
17
|
this.fontName = Urso.helper.recursiveGet('fontName', params, false);
|
|
18
18
|
this.fontSize = Urso.helper.recursiveGet('fontSize', params, false);
|
|
19
|
-
|
|
20
|
-
this.maxWidth = Urso.helper.recursiveGet('maxWidth', params, false); //todo
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
_addBaseObject() {
|
|
@@ -118,10 +118,22 @@ class ModulesObjectsProxy {
|
|
|
118
118
|
const baseObjectWidth = baseObject._texture ? Math.abs(baseObject.scale.x) * baseObject._texture.orig.width : baseObject.width;
|
|
119
119
|
const baseObjectHeight = baseObject._texture ? Math.abs(baseObject.scale.y) * baseObject._texture.orig.height : baseObject.height;
|
|
120
120
|
|
|
121
|
-
if (
|
|
121
|
+
if (
|
|
122
|
+
target.maxWidth &&
|
|
123
|
+
(
|
|
124
|
+
target.maxWidth < baseObjectWidth || //maxWidth is lower than object width
|
|
125
|
+
(target.maxWidth > baseObjectWidth && target._baseObject.scale.x < 1) //maxWidth is higher than object width and object is downscaled
|
|
126
|
+
)
|
|
127
|
+
) //check maxWidth
|
|
122
128
|
calculationNeed = true;
|
|
123
129
|
|
|
124
|
-
if (
|
|
130
|
+
if (
|
|
131
|
+
target.maxHeight &&
|
|
132
|
+
(
|
|
133
|
+
target.maxHeight < baseObjectHeight || //maxHeight is lower than object height
|
|
134
|
+
(target.maxHeight > baseObjectHeight && target._baseObject.scale.y < 1) //maxHeight is higher than object height and object is downscaled
|
|
135
|
+
)
|
|
136
|
+
) //check maxHeight
|
|
125
137
|
calculationNeed = true;
|
|
126
138
|
|
|
127
139
|
if (!calculationNeed)
|