Skip to content

Commit

Permalink
fix: typo #104
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 5, 2020
1 parent bf390d3 commit c8f824c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 62 deletions.
36 changes: 4 additions & 32 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14758,23 +14758,7 @@
}
}
});
}); // ['__struct'].forEach(fn => {
// Object.defineProperty(Component.prototype, fn, {
// get() {
// let sr = this.shadowRoot;
// if(sr) {
// return sr[fn];
// }
// },
// set(v) {
// let sr = this.shadowRoot;
// if(sr) {
// sr[fn] = v;
// }
// },
// });
// });

});
['__layout', '__layoutAbs', '__tryLayInline', '__offsetX', '__offsetY', '__calAutoBasis', '__calMp', '__calAbs', '__renderAsMask', '__renderByMask', '__mp', 'animate', 'removeAnimate', 'clearAnimate', 'updateStyle', 'deepScan', '__cancelCache', '__applyCache', '__mergeBbox', '__structure', '__modifyStruct'].forEach(function (fn) {
Component$1.prototype[fn] = function () {
var sr = this.shadowRoot;
Expand Down Expand Up @@ -15490,10 +15474,9 @@
var d = 0;

if (this !== root) {
var _d = this.__struct.total - struct.total;

d = this.__struct.total - struct.total;
struct = this.domParent.__struct;
struct.total += _d;
struct.total += d;
}

return [this.__struct, d];
Expand Down Expand Up @@ -18226,18 +18209,7 @@
}

sr.__parent = oldSr.parent;
sr.__struct = oldSr.__struct; // let s = cp.shadow;
// if(s instanceof Xom) {
// s.__width = oldS.width;
// s.__height = oldS.height;
// s.__computedStyle = oldS.computedStyle;
// s.__layoutData = oldS.layoutData;
// }
// else {
// s.__parent = oldS.parent;
// }
// s.__struct = oldS.__struct;

sr.__struct = oldSr.__struct;
updateList.push(cp); // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp

if (!util.isObject(json) || !json.placeholder) {
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions src/node/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,23 +284,6 @@ Object.keys(change.GEOM).concat([
});
});

// ['__struct'].forEach(fn => {
// Object.defineProperty(Component.prototype, fn, {
// get() {
// let sr = this.shadowRoot;
// if(sr) {
// return sr[fn];
// }
// },
// set(v) {
// let sr = this.shadowRoot;
// if(sr) {
// sr[fn] = v;
// }
// },
// });
// });

[
'__layout',
'__layoutAbs',
Expand Down
2 changes: 1 addition & 1 deletion src/node/Dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class Dom extends Xom {
root.__structs.splice(struct.index + offset, struct.total + 1, ...ns);
let d = 0;
if(this !== root) {
let d = this.__struct.total - struct.total;
d = this.__struct.total - struct.total;
struct = this.domParent.__struct;
struct.total += d;
}
Expand Down
11 changes: 0 additions & 11 deletions src/util/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,6 @@ function updateCp(cp, props, state) {
}
sr.__parent = oldSr.parent;
sr.__struct = oldSr.__struct;
// let s = cp.shadow;
// if(s instanceof Xom) {
// s.__width = oldS.width;
// s.__height = oldS.height;
// s.__computedStyle = oldS.computedStyle;
// s.__layoutData = oldS.layoutData;
// }
// else {
// s.__parent = oldS.parent;
// }
// s.__struct = oldS.__struct;
updateList.push(cp);
// 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp
if(!util.isObject(json) || !json.placeholder) {
Expand Down

0 comments on commit c8f824c

Please sign in to comment.