Commit 362fb7d9 authored by rockyl's avatar rockyl

Merge branch 'mvvm' into res-group

# Conflicts:
#	debug/engine.js.map
#	manifest.json
#	src/zeroing/game-warpper/StackContainer.ts
parents 6d7c3150 1a619360
...@@ -1508,12 +1508,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -1508,12 +1508,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
return this.$mask; return this.$mask;
}, },
set: function (value) { set: function (value) {
if (value === this) {
return;
}
if (this.$mask) { if (this.$mask) {
this.$mask.renderable = true; this.$mask.renderable = true;
this.$mask.isUsedToMask = false; this.$mask.isUsedToMask = false;
if (this.$mask.parent) {
this.$mask.parent.removeChild(this.$mask);
}
} }
this.$mask = value; this.$mask = value;
if (this.$mask) { if (this.$mask) {
...@@ -1560,7 +1560,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -1560,7 +1560,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}(EventDispatcher)); }(EventDispatcher));
DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform; DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;
DisplayObject.prototype.displayObjectHitTestPoint = DisplayObject.prototype.hitTestPoint; DisplayObject.prototype.displayObjectHitTestPoint = DisplayObject.prototype.hitTestPoint;
//# sourceMappingURL=DisplayObject.js.map
var GDispatcher = (function () { var GDispatcher = (function () {
function GDispatcher() { function GDispatcher() {
...@@ -2026,6 +2025,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -2026,6 +2025,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
} }
} }
} }
//# sourceMappingURL=utils.js.map
function transPoint(str, sep) { function transPoint(str, sep) {
if (sep === void 0) { sep = ','; } if (sep === void 0) { sep = ','; }
...@@ -2480,7 +2480,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -2480,7 +2480,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
var name = args[0]; var name = args[0];
var dataMapping = this.getDataMapping(name); var dataMapping = this.getDataMapping(name);
try { try {
var data = this.getDataByPath(dataMapping.path, undefined, true); var data = this.getDataByPath(dataMapping.path, undefined, false);
if (args[1] !== undefined) { if (args[1] !== undefined) {
data = data[args[1]]; data = data[args[1]];
} }
...@@ -2858,7 +2858,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -2858,7 +2858,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
props[key] = nameValue !== undefined ? nameValue : dataCenter.getDataByPath(name); props[key] = nameValue !== undefined ? nameValue : dataCenter.getDataByPath(name);
break; break;
case 'env': case 'env':
props[key] = env[name]; props[key] = getDataByPath(env, name);
break; break;
case 'map': case 'map':
this.updateProps(props[key] = {}, args, name, name); this.updateProps(props[key] = {}, args, name, name);
...@@ -3415,8 +3415,9 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -3415,8 +3415,9 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
if (isMouseEvent === void 0) { isMouseEvent = false; } if (isMouseEvent === void 0) { isMouseEvent = false; }
if (!this.visible) if (!this.visible)
return null; return null;
var result = this.hitTestSelf(globalPoint);
if (isMouseEvent && !this.mouseChildren) if (isMouseEvent && !this.mouseChildren)
return this.hitTestSelf(globalPoint); return result;
var children = this.children; var children = this.children;
var length = children.length; var length = children.length;
var child, hitDisplayObject; var child, hitDisplayObject;
...@@ -3440,11 +3441,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -3440,11 +3441,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}; };
Container.prototype.hitTestSelfBounds = function (globalPoint) { Container.prototype.hitTestSelfBounds = function (globalPoint) {
if (this.width && this.height) { if (this.width && this.height) {
var lp = this.globalToLocal(globalPoint, DisplayObject._bp); var _a = this.getBounds(), tx = _a.x, ty = _a.y;
if (lp.x > 0 && var x = globalPoint.x, y = globalPoint.y;
lp.x < this.width && if (x > tx &&
lp.y > 0 && x < tx + this.width &&
lp.y < this.height) y > ty &&
y < ty + this.height)
return this; return this;
} }
return null; return null;
...@@ -16653,7 +16655,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -16653,7 +16655,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
StackContainer.prototype.pop = function (dispatch) { StackContainer.prototype.pop = function (dispatch) {
if (dispatch === void 0) { dispatch = true; } if (dispatch === void 0) { dispatch = true; }
var len = this.children.length; var len = this.children.length;
if (len == 0) { if (len <= 0) {
return false; return false;
} }
this.removeChildAt(len - 1); this.removeChildAt(len - 1);
...@@ -20121,6 +20123,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -20121,6 +20123,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
value: (isArray ? curList[curIndex] : curList[curIndex].value), value: (isArray ? curList[curIndex] : curList[curIndex].value),
writable: false writable: false
}); });
Object.defineProperty(newNode, "$data", {
configurable: true,
enumerable: false,
value: (isArray ? curList[curIndex] : curList[curIndex].value),
writable: false
});
context.compiler.compile(newNode, newScope); context.compiler.compile(newNode, newScope);
lastNode = newNode; lastNode = newNode;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"id":"engine","url":"engine.0e9ca700c12d72334946cf67784ad8ad67977c13.js"} {"id":"engine","url":"engine.c62a7b1e88c4bcbbf86609a9b9fe3c2fd353dad2.js"}
\ No newline at end of file \ No newline at end of file
...@@ -492,7 +492,8 @@ export default class Container extends DisplayObject { ...@@ -492,7 +492,8 @@ export default class Container extends DisplayObject {
//如果不可见 //如果不可见
if (!this.visible) return null if (!this.visible) return null
//如果禁止子级的鼠标事件 //如果禁止子级的鼠标事件
if (isMouseEvent && !this.mouseChildren) return this.hitTestSelf(globalPoint); let result = this.hitTestSelf(globalPoint);
if (isMouseEvent && !this.mouseChildren) return result;
var children = this.children; var children = this.children;
var length = children.length; var length = children.length;
let child, hitDisplayObject; let child, hitDisplayObject;
...@@ -521,11 +522,12 @@ export default class Container extends DisplayObject { ...@@ -521,11 +522,12 @@ export default class Container extends DisplayObject {
hitTestSelfBounds(globalPoint) { hitTestSelfBounds(globalPoint) {
if (this.width && this.height) { if (this.width && this.height) {
let lp = this.globalToLocal(globalPoint, DisplayObject._bp); let {x: tx, y: ty} = this.getBounds();
if (lp.x > 0 && const {x, y} = globalPoint;
lp.x < this.width && if (x > tx &&
lp.y > 0 && x < tx + this.width &&
lp.y < this.height y > ty &&
y < ty + this.height
) return this; ) return this;
} }
return null return null
......
...@@ -609,14 +609,17 @@ export class DisplayObject extends EventDispatcher { ...@@ -609,14 +609,17 @@ export class DisplayObject extends EventDispatcher {
} }
set mask(value) { set mask(value) {
if(value === this){
return;
}
if (this.$mask) { if (this.$mask) {
//原先有的遮罩,重置属性 //原先有的遮罩,重置属性
this.$mask.renderable = true; this.$mask.renderable = true;
this.$mask.isUsedToMask = false; this.$mask.isUsedToMask = false;
if (this.$mask.parent) { /*if (this.$mask.parent) {
this.$mask.parent.removeChild(this.$mask) this.$mask.parent.removeChild(this.$mask)
//是否销毁 //是否销毁
} }*/
} }
this.$mask = value; this.$mask = value;
......
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