mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
track own bindings
This commit is contained in:
parent
bcd44d0c93
commit
e0138a4614
1 changed files with 11 additions and 1 deletions
|
@ -3,6 +3,7 @@ define(function (require) {
|
|||
var d3 = require('d3');
|
||||
var $ = require('jquery');
|
||||
var _ = require('lodash');
|
||||
var Binder = require('ui/Binder');
|
||||
|
||||
/**
|
||||
* Adds allerts that float in front of a visualization
|
||||
|
@ -18,9 +19,10 @@ define(function (require) {
|
|||
|
||||
this.vis = vis;
|
||||
this.data = data;
|
||||
this.binder = new Binder();
|
||||
this.alertDefs = alertDefs || [];
|
||||
|
||||
vis.binder.jqOn(vis.el, 'mouseenter', '.vis-alerts-tray', function () {
|
||||
this.binder.jqOn(vis.el, 'mouseenter', '.vis-alerts-tray', function () {
|
||||
var $tray = $(this);
|
||||
hide();
|
||||
$(vis.el).on('mousemove', checkForExit);
|
||||
|
@ -87,6 +89,14 @@ define(function (require) {
|
|||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Tear down the Alerts
|
||||
* @return {undefined}
|
||||
*/
|
||||
Alerts.prototype.destroy = function () {
|
||||
this.binder.destroy();
|
||||
};
|
||||
|
||||
return Alerts;
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue