Added ability to treat the labelsDiv as a ID as well as an Element. This allows...
authorsteve <steve@dev.mjnservices.com>
Tue, 7 Sep 2010 15:50:13 +0000 (09:50 -0600)
committersteve <steve@dev.mjnservices.com>
Tue, 7 Sep 2010 15:50:13 +0000 (09:50 -0600)
dygraph.js

index f5e7d38..5e04d1d 100644 (file)
@@ -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 = {