|
|
@ -35484,6 +35484,17 @@ BI.Single = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_clearTimeOut: function() { |
|
|
|
|
|
|
|
if (BI.isNotNull(this.showTimeout)) { |
|
|
|
|
|
|
|
clearTimeout(this.showTimeout); |
|
|
|
|
|
|
|
this.showTimeout = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNotNull(this.hideTimeout)) { |
|
|
|
|
|
|
|
clearTimeout(this.hideTimeout); |
|
|
|
|
|
|
|
this.showTimeout = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
enableHover: function (opt) { |
|
|
|
enableHover: function (opt) { |
|
|
|
opt || (opt = {}); |
|
|
|
opt || (opt = {}); |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
@ -35491,29 +35502,40 @@ BI.Single = BI.inherit(BI.Widget, { |
|
|
|
this.element.on("mouseenter.title" + this.getName(), function (e) { |
|
|
|
this.element.on("mouseenter.title" + this.getName(), function (e) { |
|
|
|
self._e = e; |
|
|
|
self._e = e; |
|
|
|
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { |
|
|
|
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { |
|
|
|
self.timeout = BI.delay(function () { |
|
|
|
self.showTimeout = BI.delay(function () { |
|
|
|
self._showToolTip(self._e || e, opt); |
|
|
|
self._showToolTip(self._e || e, opt); |
|
|
|
}, 200); |
|
|
|
}, 200); |
|
|
|
} else if (self.getTipType() === "success" || self.isEnabled()) { |
|
|
|
} else if (self.getTipType() === "success" || self.isEnabled()) { |
|
|
|
self.timeout = BI.delay(function () { |
|
|
|
self.showTimeout = BI.delay(function () { |
|
|
|
self._showToolTip(self._e || e, opt); |
|
|
|
self._showToolTip(self._e || e, opt); |
|
|
|
}, 500); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.element.on("mousemove.title" + this.getName(), function (e) { |
|
|
|
this.element.on("mousemove.title" + this.getName(), function (e) { |
|
|
|
self._e = e; |
|
|
|
self._e = e; |
|
|
|
if (!self.element.__isMouseInBounds__(e)) { |
|
|
|
if (BI.isNotNull(self.showTimeout)) { |
|
|
|
if (BI.isNotNull(self.timeout)) { |
|
|
|
clearTimeout(self.showTimeout); |
|
|
|
clearTimeout(self.timeout); |
|
|
|
self.showTimeout = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(BI.isNull(self.hideTimeout)) { |
|
|
|
|
|
|
|
self.hideTimeout = BI.delay(function () { |
|
|
|
self._hideTooltip(); |
|
|
|
self._hideTooltip(); |
|
|
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.showTimeout = BI.delay(function () { |
|
|
|
|
|
|
|
if (BI.isNotNull(self.hideTimeout)) { |
|
|
|
|
|
|
|
clearTimeout(self.hideTimeout); |
|
|
|
|
|
|
|
self.hideTimeout = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
self._showToolTip(self._e || e, opt); |
|
|
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
this.element.on("mouseleave.title" + this.getName(), function () { |
|
|
|
this.element.on("mouseleave.title" + this.getName(), function (e) { |
|
|
|
self._e = null; |
|
|
|
self._e = null; |
|
|
|
if (BI.isNotNull(self.timeout)) { |
|
|
|
self._clearTimeOut(); |
|
|
|
clearTimeout(self.timeout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
self._hideTooltip(); |
|
|
|
self._hideTooltip(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this._hoverBinded = true; |
|
|
|
this._hoverBinded = true; |
|
|
@ -35522,9 +35544,7 @@ BI.Single = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
disabledHover: function () { |
|
|
|
disabledHover: function () { |
|
|
|
// 取消hover事件
|
|
|
|
// 取消hover事件
|
|
|
|
if (BI.isNotNull(this.timeout)) { |
|
|
|
this._clearTimeOut(); |
|
|
|
clearTimeout(this.timeout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this._hideTooltip(); |
|
|
|
this._hideTooltip(); |
|
|
|
this.element.unbind("mouseenter.title" + this.getName()) |
|
|
|
this.element.unbind("mouseenter.title" + this.getName()) |
|
|
|
.unbind("mousemove.title" + this.getName()) |
|
|
|
.unbind("mousemove.title" + this.getName()) |
|
|
|