Commit fc00d833 by Torkel Ödegaard Committed by GitHub

Alerting: Improve alert threshold handle dragging behavior (#20922)

parent caa3c6c9
...@@ -60,8 +60,7 @@ export class ThresholdManager { ...@@ -60,8 +60,7 @@ export class ThresholdManager {
model.value = graphValue; model.value = graphValue;
handleElem.off('mousemove', dragging); handleElem.off('mousemove', dragging);
handleElem.off('mouseup', dragging); document.removeEventListener('mouseup', stopped);
handleElem.off('mouseleave', dragging);
// trigger digest and render // trigger digest and render
panelCtrl.$scope.$apply(() => { panelCtrl.$scope.$apply(() => {
...@@ -77,8 +76,7 @@ export class ThresholdManager { ...@@ -77,8 +76,7 @@ export class ThresholdManager {
posTop = handleElem.position().top; posTop = handleElem.position().top;
handleElem.on('mousemove', dragging); handleElem.on('mousemove', dragging);
handleElem.on('mouseup', stopped); document.addEventListener('mouseup', stopped);
handleElem.on('mouseleave', stopped);
} }
cleanUp() { cleanUp() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment