From 470456c59865ecb0f6fbe57f17a652e45157cbc3 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Fri, 11 Mar 2011 22:19:33 +0000 Subject: [PATCH] Added $.plot.version with the Flot version as a string and made sure the version comment at the top of jquery.flot.js is included in the minified output (suggested by arockinit) git-svn-id: https://flot.googlecode.com/svn/trunk@308 1e0a6537-2640-0410-bfb7-f154510ff394 --- API.txt | 12 +++++++++--- NEWS.txt | 2 ++ jquery.flot.js | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/API.txt b/API.txt index d0c6ac1..087bb1f 100644 --- a/API.txt +++ b/API.txt @@ -1156,9 +1156,15 @@ Here's a brief explanation of how the plugin plumbings work: Each plugin registers itself in the global array $.plot.plugins. When you make a new plot object with $.plot, Flot goes through this array calling the "init" function of each plugin and merging default options -from its "option" attribute. The init function gets a reference to the -plot object created and uses this to register hooks and add new public -methods if needed. +from the plugin's "option" attribute. The init function gets a +reference to the plot object created and uses this to register hooks +and add new public methods if needed. See the PLUGINS.txt file for details on how to write a plugin. As the above description hints, it's actually pretty easy. + + +Version number +-------------- + +The version number of Flot is available in $.plot.version. diff --git a/NEWS.txt b/NEWS.txt index a753419..9ecb96d 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -87,6 +87,8 @@ Changes: - Options for controlling whether an axis is shown or not (suggestion by Timo Tuominen) and whether to reserve space for it even if it isn't shown. +- New attribute $.plot.version with the Flot version as a string. +- The version comment is now included in the minified jquery.flot.min.js. - New hooks: drawSeries diff --git a/jquery.flot.js b/jquery.flot.js index 3a92dab..e75907c 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -1,4 +1,4 @@ -/* Javascript plotting library for jQuery, v. 0.6. +/*! Javascript plotting library for jQuery, v. 0.6. * * Released under the MIT license by IOLA, December 2007. * @@ -2481,6 +2481,8 @@ return plot; }; + $.plot.version = "0.7pre"; + $.plot.plugins = []; // returns a string with the date d formatted according to fmt