Skip to content

Commit

Permalink
fix: 无变化跳出遗漏 #104
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 3, 2020
1 parent 4bae6ca commit c920120
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19404,7 +19404,7 @@
var id = parent.__uniqueUpdateId;

if (cacheHash.hasOwnProperty(id)) {
return;
break;
}

cacheHash[id] = true;
Expand Down Expand Up @@ -19996,15 +19996,15 @@

if (updateRoot) {
this.__updateRoot = null;
hasUpdate || (hasUpdate = parseUpdate(renderMode, this, updateHash, updateRoot, reflowList, measureList, cacheHash, cacheList)); // 此时做root检查,防止root出现继承等无效样式
hasUpdate = parseUpdate(renderMode, this, updateHash, updateRoot, reflowList, measureList, cacheHash, cacheList); // 此时做root检查,防止root出现继承等无效样式

this.__checkRoot(width, height);
} // 汇总处理每个节点


var keys = Object.keys(updateHash);
keys.forEach(function (k) {
hasUpdate || (hasUpdate = parseUpdate(renderMode, _this5, updateHash, updateHash[k], reflowList, measureList, cacheHash, cacheList));
hasUpdate = parseUpdate(renderMode, _this5, updateHash, updateHash[k], reflowList, measureList, cacheHash, cacheList) || hasUpdate;
}); // 先做一部分reset避免下面measureList干扰

this.__reflowList = reflowList;
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/node/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function parseUpdate(renderMode, root, updateHash, target, reflowList, measureLi
if(parent.hasOwnProperty('__uniqueUpdateId')) {
let id = parent.__uniqueUpdateId;
if(cacheHash.hasOwnProperty(id)) {
return;
break;
}
cacheHash[id] = true;
}
Expand Down Expand Up @@ -703,14 +703,14 @@ class Root extends Dom {
// root更新特殊提前,因为有继承因素
if(updateRoot) {
this.__updateRoot = null;
hasUpdate ||= parseUpdate(renderMode, this, updateHash, updateRoot, reflowList, measureList, cacheHash, cacheList);
hasUpdate = parseUpdate(renderMode, this, updateHash, updateRoot, reflowList, measureList, cacheHash, cacheList);
// 此时做root检查,防止root出现继承等无效样式
this.__checkRoot(width, height);
}
// 汇总处理每个节点
let keys = Object.keys(updateHash);
keys.forEach(k => {
hasUpdate ||= parseUpdate(renderMode, this, updateHash, updateHash[k], reflowList, measureList, cacheHash, cacheList);
hasUpdate = parseUpdate(renderMode, this, updateHash, updateHash[k], reflowList, measureList, cacheHash, cacheList) || hasUpdate;
});
// 先做一部分reset避免下面measureList干扰
this.__reflowList = reflowList;
Expand Down

0 comments on commit c920120

Please sign in to comment.