Skip to content

Commit

Permalink
fix: cacheTotal的svg重用vd优化判断条件 #87
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Oct 15, 2020
1 parent 522bbe9 commit 06cb5be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11676,7 +11676,7 @@
if (renderMode === mode.SVG) {
if (lv < o$1.REPAINT && this.__virtualDom) {
// 局部根还在说明孩子节点无变化,可直接用老的
if (this.__cacheTotal) {
if (this.__cacheTotal && this.__cacheTotal.available) {
virtualDom = this.__virtualDom;
virtualDom.lv = lv;
} // 否则extend老的,设置lv变化,等dom调用便跟children
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/node/Xom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ class Xom extends Node {
if(renderMode === mode.SVG) {
if(lv < level.REPAINT && this.__virtualDom) {
// 局部根还在说明孩子节点无变化,可直接用老的
if(this.__cacheTotal) {
if(this.__cacheTotal && this.__cacheTotal.available) {
virtualDom = this.__virtualDom;
virtualDom.lv = lv;
}
Expand Down

0 comments on commit 06cb5be

Please sign in to comment.