mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
*really* fix hover placing.
This commit is contained in:
parent
a8d60d03fe
commit
5192f678dc
@ -235,7 +235,7 @@ class Morris.Line extends Morris.Grid
|
||||
@hover.attr 'width', maxLabelWidth + @options.hoverPaddingX * 2
|
||||
@hover.attr 'x', -@options.hoverPaddingX - maxLabelWidth / 2
|
||||
# move to y pos
|
||||
yloc = Math.min.apply null, (y for y in row._y when y is not null).concat(@top)
|
||||
yloc = Math.min.apply null, (y for y in row._y when y isnt null).concat(@bottom)
|
||||
if yloc > @hoverHeight + @options.hoverPaddingY * 2 + @options.hoverMargin + @top
|
||||
yloc = yloc - @hoverHeight / 2 - @options.hoverPaddingY - @options.hoverMargin
|
||||
else
|
||||
|
@ -671,12 +671,12 @@
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
y = _ref1[_j];
|
||||
if (y === !null) {
|
||||
if (y !== null) {
|
||||
_results.push(y);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
})()).concat(this.top));
|
||||
})()).concat(this.bottom));
|
||||
if (yloc > this.hoverHeight + this.options.hoverPaddingY * 2 + this.options.hoverMargin + this.top) {
|
||||
yloc = yloc - this.hoverHeight / 2 - this.options.hoverPaddingY - this.options.hoverMargin;
|
||||
} else {
|
||||
|
2
morris.min.js
vendored
2
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user