X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=experimental%2Fpalette%2Fpalette.js;h=514463f554c45d374cb8ec6497c0b672c9133a12;hb=4c10c8d21b6858ea9029bdb789f487d9103d72f9;hp=89483331fb1ce56aed735236593b6f0d26af9335;hpb=9390f62431dfa8174b52d0aef45df7b4c7da138e;p=dygraphs.git diff --git a/experimental/palette/palette.js b/experimental/palette/palette.js index 8948333..514463f 100644 --- a/experimental/palette/palette.js +++ b/experimental/palette/palette.js @@ -115,9 +115,7 @@ Palette.prototype.create = function(parentElement) { row.mouseover(function(source, title, type, body) { return function() { - // source[0] is un-jquerying. - // TODO(konigsberg): when tooltip is jquery, dump this. - palette.tooltip.show(source[0], title, type, body); + palette.tooltip.show(source, title, type, body); }; } (row, opt, type, Dygraph.OPTIONS_REFERENCE[opt].description)) .mouseout(function() { palette.tooltip.hide(); }) @@ -217,6 +215,9 @@ Palette.prototype.read = function() { * Write to input elements. */ Palette.prototype.write = function(hash) { + if (!hash) { + return; + } var results = {}; for (var opt in this.model) { if (this.model.hasOwnProperty(opt)) {