X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-utils.js;h=223360b319135d7745f60748d8fd7bb7d3b6643b;hb=ad617f174a6b4ec2aea3d06553534dcaf278a2bb;hp=2ccb3d0de0c2b82c47fc85543e891127db507386;hpb=222d67c9f447643d6d7beefa1db227c48c9ef92c;p=dygraphs.git diff --git a/dygraph-utils.js b/dygraph-utils.js index 2ccb3d0..223360b 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -135,7 +135,6 @@ Dygraph.prototype.warn = Dygraph.warn; /** * @param {string} message - * @private */ Dygraph.error = function(message) { Dygraph.log(Dygraph.ERROR, message); @@ -634,7 +633,6 @@ Dygraph.dateStrToMillis = function(str) { * @param {!Object} self * @param {!Object} o * @return {!Object} - * @private */ Dygraph.update = function(self, o) { if (typeof(o) != 'undefined' && o !== null) { @@ -1246,10 +1244,11 @@ Dygraph.isNodeContainedBy = function(containee, container) { if (container === null || containee === null) { return false; } - while (containee && containee !== container) { - containee = containee.parentNode; + var containeeNode = /** @type {Node} */ (containee); + while (containeeNode && containeeNode !== container) { + containeeNode = containeeNode.parentNode; } - return (containee === container); + return (containeeNode === container); };