From fedbd79791fa8b1661162e360b280cd4a8bfc839 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 7 Sep 2010 09:50:13 -0600 Subject: [PATCH] Added ability to treat the labelsDiv as a ID as well as an Element. This allows the user to set the id of the labels div prior to it being rendered in the DOM. Helpful for GWT wrapper implementation. --- dygraph.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dygraph.js b/dygraph.js index f5e7d38..5e04d1d 100644 --- a/dygraph.js +++ b/dygraph.js @@ -612,7 +612,12 @@ Dygraph.findPosY = function(obj) { * been specified. * @private */ -Dygraph.prototype.createStatusMessage_ = function(){ +Dygraph.prototype.createStatusMessage_ = function() { + var userLabelsDiv = this.user_attrs_["labelsDiv"]; + if (userLabelsDiv && null != userLabelsDiv + && (typeof(userLabelsDiv) == "string" || userLabelsDiv instanceof String)) { + this.user_attrs_["labelsDiv"] = document.getElementById(userLabelsDiv); + } if (!this.attr_("labelsDiv")) { var divWidth = this.attr_('labelsDivWidth'); var messagestyle = { -- 2.7.4