@lumino/virtualdom
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -286,2 +286,5 @@ "use strict"; | ||
} | ||
else if (arguments.length > 3) { | ||
throw new Error("hpass() should be called with 1, 2, or 3 arguments"); | ||
} | ||
return new VirtualElementPass(tag, attrs, renderer); | ||
@@ -414,12 +417,5 @@ } | ||
} | ||
// Handle the case of passthru update. | ||
if (oldVNode.type === 'passthru' && newVNode.type === 'passthru') { | ||
newVNode.render(currElem); | ||
currElem = currElem.nextSibling; | ||
continue; | ||
} | ||
// If the types of the old and new nodes differ, | ||
// create and insert a new node. | ||
if (oldVNode.type === 'text' || newVNode.type === 'text' || | ||
oldVNode.type === 'passthru' || newVNode.type === 'passthru') { | ||
if (oldVNode.type !== newVNode.type || oldVNode.type === 'text' || newVNode.type === 'text') { | ||
algorithm_1.ArrayExt.insert(oldCopy, i, newVNode); | ||
@@ -429,3 +425,3 @@ createDOMNode(newVNode, host, currElem); | ||
} | ||
// At this point, both nodes are known to be element nodes. | ||
// At this point, both nodes are known to be of matching non-text type. | ||
// If the new elem is keyed, move an old keyed elem to the proper | ||
@@ -469,3 +465,8 @@ // location before proceeding with the diff. The search can start | ||
// Update the element content. | ||
updateContent(currElem, oldVNode.children, newVNode.children); | ||
if (oldVNode.type === 'passthru' || newVNode.type === 'passthru') { | ||
newVNode.render(currElem); | ||
} | ||
else { | ||
updateContent(currElem, oldVNode.children, newVNode.children); | ||
} | ||
// Step to the next sibling element. | ||
@@ -472,0 +473,0 @@ currElem = currElem.nextSibling; |
{ | ||
"name": "@lumino/virtualdom", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Lumino Virtual DOM", | ||
@@ -47,3 +47,3 @@ "homepage": "https://github.com/jupyterlab/lumino", | ||
"dependencies": { | ||
"@lumino/algorithm": "^1.2.2" | ||
"@lumino/algorithm": "^1.2.3" | ||
}, | ||
@@ -71,3 +71,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "53ec13d322579e356862268970649f9c1213a7ac" | ||
"gitHead": "df307f6f511ad7f56dd930773f31628e53b0c148" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1191
Updated@lumino/algorithm@^1.2.3