diff --git a/.vscode/launch.json b/.vscode/launch.json index 81e8756..17e2ff9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", - "url": "http://localhost:3000/d/Votr2gvmk/nginx", + "url": "http://localhost:3000/", "sourceMaps": true, "pathMapping": { "/public/plugins/hastic-graph-panel": "${workspaceFolder}/dist" diff --git a/src/panel/graph_panel/graph_renderer.ts b/src/panel/graph_panel/graph_renderer.ts index 4d6ffb0..92129c6 100644 --- a/src/panel/graph_panel/graph_renderer.ts +++ b/src/panel/graph_panel/graph_renderer.ts @@ -56,7 +56,9 @@ export class GraphRenderer { private timeSrv: any; private _graphMousePosition: any; - constructor ($elem: JQuery, timeSrv, contextSrv, scope) { + constructor($elem: JQuery, timeSrv, contextSrv, scope) { + + var self = this; this.$elem = $elem; @@ -164,7 +166,7 @@ export class GraphRenderer { // this.eventManager.updateTime(selectionEvent.xaxis); // }, 100); } else { - this.scope.$apply(function() { + this.scope.$apply(() => { this.timeSrv.setTime({ from: moment.utc(selectionEvent.xaxis.from), to: moment.utc(selectionEvent.xaxis.to),