X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Fannotations.js;h=6a248949351ebcac23f6e7cbf2064d5c02379a70;hb=df8e5de276509d4da7a4b461465316120bdd13b6;hp=d47f8c76efbcdf922741bdb7df25077096f113eb;hpb=98eb4713efecf58b904def42d9030e61bcbb4181;p=dygraphs.git diff --git a/plugins/annotations.js b/plugins/annotations.js index d47f8c7..6a24894 100644 --- a/plugins/annotations.js +++ b/plugins/annotations.js @@ -4,8 +4,12 @@ * MIT-licensed (http://opensource.org/licenses/MIT) */ +/*global Dygraph:false */ + Dygraph.Plugins.Annotations = (function() { +"use strict"; + /** Current bits of jankiness: - Uses dygraph.layout_ to get the parsed annotations. @@ -52,7 +56,7 @@ annotations.prototype.didDrawChart = function(e) { // Early out in the (common) case of zero annotations. var points = g.layout_.annotated_points; - if (!points || points.length == 0) return; + if (!points || points.length === 0) return; var containerDiv = e.canvas.parentNode; var annotationStyle = {