Commit 96c534b8 authored by rockyl's avatar rockyl

修复store实例化的问题

parent 7ad67d40
...@@ -3582,12 +3582,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -3582,12 +3582,12 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
Object.defineProperty(Container.prototype, "$store", { Object.defineProperty(Container.prototype, "$store", {
get: function () { get: function () {
var p = this; var p = this;
while (p.parent) { do {
p = p.parent;
if (p['$isViewRoot']) { if (p['$isViewRoot']) {
break; break;
} }
} p = p.parent;
} while (p.parent);
if (p) { if (p) {
return p['$_store']; return p['$_store'];
} }
...@@ -5860,6 +5860,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -5860,6 +5860,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
}; };
return Sprite; return Sprite;
}(Container)); }(Container));
//# sourceMappingURL=Sprite.js.map
var BatchDrawCall = (function () { var BatchDrawCall = (function () {
function BatchDrawCall() { function BatchDrawCall() {
...@@ -20713,6 +20714,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -20713,6 +20714,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
exports.DATA_CENTER_EVENT = DATA_CENTER_EVENT; exports.DATA_CENTER_EVENT = DATA_CENTER_EVENT;
exports.DATA_URI = DATA_URI; exports.DATA_URI = DATA_URI;
exports.DEG_TO_RAD = DEG_TO_RAD; exports.DEG_TO_RAD = DEG_TO_RAD;
exports.DataCenter = DataCenter;
exports.DisplayObject = DisplayObject; exports.DisplayObject = DisplayObject;
exports.DrawAllToCanvas = DrawAllToCanvas; exports.DrawAllToCanvas = DrawAllToCanvas;
exports.ESCAPE_REG_EXP = ESCAPE_REG_EXP; exports.ESCAPE_REG_EXP = ESCAPE_REG_EXP;
...@@ -20778,6 +20780,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate: ...@@ -20778,6 +20780,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
exports.cos = cos; exports.cos = cos;
exports.countTrailingZeros = countTrailingZeros; exports.countTrailingZeros = countTrailingZeros;
exports.createTextureSheet = createTextureSheet; exports.createTextureSheet = createTextureSheet;
exports.dataCenter = dataCenter;
exports.decomposeDataUri = decomposeDataUri; exports.decomposeDataUri = decomposeDataUri;
exports.deepDirtyFieldDetector = deepDirtyFieldDetector; exports.deepDirtyFieldDetector = deepDirtyFieldDetector;
exports.deepDirtyFieldTrigger = deepDirtyFieldTrigger; exports.deepDirtyFieldTrigger = deepDirtyFieldTrigger;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"id":"engine","url":"engine.47eb390007c368d3dc5648734153301ebead724b.js"} {"id":"engine","url":"engine.a00613f119b951548555b2f0d7ddcd5063975f8e.js"}
\ No newline at end of file \ No newline at end of file
...@@ -759,12 +759,13 @@ export default class Container extends DisplayObject { ...@@ -759,12 +759,13 @@ export default class Container extends DisplayObject {
get $store() { get $store() {
let p = this; let p = this;
while (p.parent) { do {
p = p.parent;
if (p['$isViewRoot']) { if (p['$isViewRoot']) {
break; break;
} }
p = p.parent;
} }
while (p.parent);
if (p) { if (p) {
return p['$_store']; return p['$_store'];
......
...@@ -9,3 +9,4 @@ export * from './nodes' ...@@ -9,3 +9,4 @@ export * from './nodes'
export * from './sound' export * from './sound'
export * from './assets-manager' export * from './assets-manager'
export * from './texture-sheet' export * from './texture-sheet'
export * from './data-center'
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