Bounding the xLabelAngle option.
This commit is contained in:
parent
05cdc7f3e4
commit
95667e2240
|
@ -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;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue