Commit 40254ae1 authored by haiyoucuv's avatar haiyoucuv

1

parent 8f64ec42
......@@ -2,12 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="af35c04f-08f6-48ed-85db-2f94c60e87fd" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/zeroing/game-warpper/nodes/DocumentFlow.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/debug/engine.js" beforeDir="false" afterPath="$PROJECT_DIR$/debug/engine.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/debug/engine.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/debug/engine.js.map" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/zeroing/decorators/AlignManager.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/zeroing/decorators/AlignManager.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/zeroing/game-warpper/nodes/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/zeroing/game-warpper/nodes/index.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -312,11 +307,11 @@
<screen x="1680" y="-229" width="1920" height="1177" />
</state>
<state x="2327" y="157" key="git4idea.merge.GitPullDialog/35.23.1645.1027/1680.-229.1920.1177@1680.-229.1920.1177" timestamp="1587714144888" />
<state x="2305" y="66" width="670" height="676" key="search.everywhere.popup" timestamp="1590634495884">
<state x="2305" y="66" width="670" height="676" key="search.everywhere.popup" timestamp="1590635813011">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
<state x="2305" y="18" width="670" height="690" key="search.everywhere.popup/0.0.1680.1050/1680.-252.1920.1200@1680.-252.1920.1200" timestamp="1587713287518" />
<state x="2305" y="66" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1590634495884" />
<state x="2305" y="66" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1590635813011" />
<state x="2305" y="36" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-229.1920.1177@1680.-229.1920.1177" timestamp="1590569941978" />
<state x="570" y="254" width="670" height="590" key="search.everywhere.popup/35.23.1645.1027/1680.-229.1920.1177@35.23.1645.1027" timestamp="1590379261653" />
<state x="570" y="254" width="670" height="590" key="search.everywhere.popup/35.23.1645.1027@35.23.1645.1027" timestamp="1589767535433" />
......
......@@ -1653,7 +1653,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
function objClone(obj) {
return obj ? JSON.parse(JSON.stringify(obj)) : obj;
}
var percentKeys = ['width', 'height'];
var percentKeys = ['width', 'height', 'top', 'left', 'bottom', 'right'];
function propertyParse(key, node, properties) {
var value = properties[key];
var targetKey = key;
......@@ -1916,7 +1916,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
return;
var percentWidth = that.percentWidth, percentHeight = that.percentHeight, top = that.top, bottom = that.bottom, left = that.left, right = that.right, percentTop = that.percentTop, percentBottom = that.percentBottom, percentLeft = that.percentLeft, percentRight = that.percentRight, horizonCenter = that.horizonCenter, verticalCenter = that.verticalCenter;
var _a = that._width, tW_Z = _a === void 0 ? 0 : _a, _b = that._height, tH_Z = _b === void 0 ? 0 : _b;
if (that._instanceType == "TextFieldNode") {
if (that._instanceType == "TextFieldNode" || that._instanceType == "Label") {
tW_Z = that.width;
tH_Z = that.height;
}
......@@ -1968,7 +1968,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
if (toBoolean(that.children[i].right))
continue;
var _x = that.children[i].x || 0;
var _w = (that._instanceType == "TextFieldNode") ? that.width : (that.children[i].__width || 0);
var _w = (that._instanceType == "TextFieldNode" || that._instanceType == "Label") ? that.width : (that.children[i].__width || 0);
(_x + _w > maxR) ? maxR = _x + _w : 0;
}
that.width = maxR;
......@@ -1981,7 +1981,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
if (toBoolean(that.children[i].bottom))
continue;
var _y = that.children[i].y || 0;
var _h = (that._instanceType == "TextFieldNode") ? that.height : (that.children[i].__height || 0);
var _h = (that._instanceType == "TextFieldNode" || that._instanceType == "Label") ? that.height : (that.children[i].__height || 0);
(_y + _h > maxB) ? maxB = _y + _h : 0;
}
that.height = maxB;
......@@ -15008,10 +15008,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}
this.dirty = true;
this.dispatchEvent(Event.RESIZE);
this.dispatchEvent(Event.MAYBE_ALIGN);
this.__width = (toBoolean(this.percentWidth) || (toBoolean(this.left) && toBoolean(this.right)))
? 0
: value;
}
},
enumerable: true,
......@@ -15037,10 +15033,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}
this.dirty = true;
this.dispatchEvent(Event.RESIZE);
this.dispatchEvent(Event.MAYBE_ALIGN);
this.__height = (toBoolean(this.percentHeight) || (toBoolean(this.top) && toBoolean(this.bottom)))
? 0
: value;
}
},
enumerable: true,
......@@ -15593,6 +15585,9 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
};
TextField.prototype._calculateBounds = function () {
var _a = this._localBoundsSelf, width = _a.width, height = _a.height;
var matrix = this.transform.worldMatrix;
this._bounds.x = matrix.tx;
this._bounds.y = matrix.ty;
this._bounds.width = width;
this._bounds.height = height;
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -57,7 +57,7 @@ class AlignManager {
} = that;
let {_width: tW_Z = 0, _height: tH_Z = 0} = that;
if (that._instanceType == "TextFieldNode") {
if (that._instanceType == "TextFieldNode" || that._instanceType == "Label") {
tW_Z = that.width;
tH_Z = that.height;
}
......@@ -179,7 +179,7 @@ class AlignManager {
for (let i = 0; i < len; i++) {
if (toBoolean(that.children[i].right)) continue; /// TODO 开启这个,忽略带 right 值的子节点
let _x = that.children[i].x || 0;
let _w = (that._instanceType == "TextFieldNode") ? that.width : (that.children[i].__width || 0);
let _w = (that._instanceType == "TextFieldNode" || that._instanceType == "Label") ? that.width : (that.children[i].__width || 0);
(_x + _w > maxR) ? maxR = _x + _w : 0;
}
that.width = maxR;
......@@ -210,7 +210,7 @@ class AlignManager {
for (let i = 0; i < len; i++) {
if (toBoolean(that.children[i].bottom)) continue; /// TODO 开启这个,忽略带 bottom 值的子节点
let _y = that.children[i].y || 0;
let _h = (that._instanceType == "TextFieldNode") ? that.height : (that.children[i].__height || 0);
let _h = (that._instanceType == "TextFieldNode" || that._instanceType == "Label") ? that.height : (that.children[i].__height || 0);
(_y + _h > maxB) ? maxB = _y + _h : 0;
}
that.height = maxB;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment