mirror of
https://github.com/morrisjs/morris.js.git
synced 2026-01-09 14:38:03 -05:00
Bounding the xLabelAngle option.
This commit is contained in:
@@ -21,6 +21,9 @@ class Morris.Grid extends Morris.EventEmitter
|
||||
if typeof @options.units is 'string'
|
||||
@options.postUnits = options.units
|
||||
|
||||
# bound xLabelAngle to 0..90
|
||||
@options.xLabelAngle = Math.max(0, Math.min(90, @options.xLabelAngle))
|
||||
|
||||
# the raphael drawing instance
|
||||
@raphael = new Raphael(@el[0])
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
if (typeof this.options.units === 'string') {
|
||||
this.options.postUnits = options.units;
|
||||
}
|
||||
this.options.xLabelAngle = Math.max(0, Math.min(90, this.options.xLabelAngle));
|
||||
this.raphael = new Raphael(this.el[0]);
|
||||
this.elementWidth = null;
|
||||
this.elementHeight = null;
|
||||
|
||||
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user