|
|
|
@ -1,13 +1,13 @@ |
|
|
|
|
import angular from 'angular'; |
|
|
|
|
import $ from 'jquery'; |
|
|
|
|
import { partition, each } from 'lodash'; |
|
|
|
|
//@ts-ignore
|
|
|
|
|
import Drop from 'tether-drop'; |
|
|
|
|
import { CreatePlotOverlay } from '@grafana/data'; |
|
|
|
|
import { getLegacyAngularInjector } from '@grafana/runtime'; |
|
|
|
|
|
|
|
|
|
/** @ngInject */ |
|
|
|
|
const createAnnotationToolip: CreatePlotOverlay = (element, event, plot) => { |
|
|
|
|
const injector = angular.element(document).injector(); |
|
|
|
|
const injector = getLegacyAngularInjector(); |
|
|
|
|
const content = document.createElement('div'); |
|
|
|
|
content.innerHTML = '<annotation-tooltip event="event" on-edit="onEdit()"></annotation-tooltip>'; |
|
|
|
|
|
|
|
|
@ -68,7 +68,7 @@ const createEditPopover: CreatePlotOverlay = (element, event, plot) => { |
|
|
|
|
|
|
|
|
|
// wait for element to be attached and positioned
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
const injector = angular.element(document).injector(); |
|
|
|
|
const injector = getLegacyAngularInjector(); |
|
|
|
|
const content = document.createElement('div'); |
|
|
|
|
content.innerHTML = '<event-editor panel-ctrl="panelCtrl" event="event" close="close()"></event-editor>'; |
|
|
|
|
|
|
|
|
|