projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5daa462
)
Add comments and warnings for legacy options.
author
Robert Konigsberg
<konigsberg@gmail.com>
Sun, 25 Nov 2012 14:26:09 +0000
(09:26 -0500)
committer
Robert Konigsberg
<konigsberg@gmail.com>
Sun, 25 Nov 2012 14:26:55 +0000
(09:26 -0500)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
3783907
..
195f915
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-418,6
+418,9
@@
Dygraph.prototype.__init__ = function(div, file, attrs) {
attrs.animatedZooms = false;
}
attrs.animatedZooms = false;
}
+ // DEPRECATION WARNING: All option processing should be moved from
+ // attrs_ and user_attrs_ to options_, which holds all this information.
+ //
// Dygraphs has many options, some of which interact with one another.
// To keep track of everything, we maintain two sets of options:
//
// Dygraphs has many options, some of which interact with one another.
// To keep track of everything, we maintain two sets of options:
//
@@
-2509,7
+2512,6
@@
Dygraph.prototype.computeYAxes_ = function() {
}
}
}
}
- // New axes options
for (axis = 0; axis < this.axes_.length; axis++) {
if (axis === 0) {
opts = this.optionsViewForAxis_('y' + (axis ? '2' : ''));
for (axis = 0; axis < this.axes_.length; axis++) {
if (axis === 0) {
opts = this.optionsViewForAxis_('y' + (axis ? '2' : ''));
@@
-3395,6
+3397,9
@@
Dygraph.mapLegacyOptions_ = function(attrs) {
};
var map = function(opt, axis, new_opt) {
if (typeof(attrs[opt]) != 'undefined') {
};
var map = function(opt, axis, new_opt) {
if (typeof(attrs[opt]) != 'undefined') {
+ Dygraph.warn("Option " + opt + " is deprecated. Use the " +
+ new_opt + " option for the " + axis + " axis instead. " +
+ "(e.g. { axes : { " + axis + " : { " + new_opt + " : ... } } }");
set(axis, new_opt, attrs[opt]);
delete my_attrs[opt];
}
set(axis, new_opt, attrs[opt]);
delete my_attrs[opt];
}