mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-09-21 10:41:32 +02:00
Hide hover tooltip if empty
This commit is contained in:
parent
d31c072942
commit
9532354320
@ -11,6 +11,9 @@ class Morris.Hover
|
||||
@options.parent.append(@el)
|
||||
|
||||
update: (html, x, y) ->
|
||||
if not html
|
||||
@hide()
|
||||
else
|
||||
@html(html)
|
||||
@show()
|
||||
@moveTo(x, y)
|
||||
|
@ -663,9 +663,13 @@ Licensed under the BSD-2-Clause License.
|
||||
}
|
||||
|
||||
Hover.prototype.update = function(html, x, y) {
|
||||
if (!html) {
|
||||
return this.hide();
|
||||
} else {
|
||||
this.html(html);
|
||||
this.show();
|
||||
return this.moveTo(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
Hover.prototype.html = function(content) {
|
||||
|
4
morris.min.js
vendored
4
morris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user