Skip to content

Commit f387e39

Browse files
committed
mend
1 parent 0b919c7 commit f387e39

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
///<reference path="../../../headers/common.d.ts" />
2+
3+
import 'jquery.flot';
4+
import $ from 'jquery';
5+
6+
var options = {};
7+
8+
function getHandleTemplate(type) {
9+
return `
10+
<div class="alert-handle" style="position: absolute; top: 100px; right: -50px;">
11+
<i class="icon-gf icon-gf-${type} alert-icon-${type}"></i>
12+
> 100
13+
</div>
14+
`;
15+
}
16+
17+
function drawAlertHandles(plot, canvascontext) {
18+
var $warnHandle = $(getHandleTemplate('warn'));
19+
20+
var $placeholder = plot.getPlaceholder();
21+
$placeholder.find(".alert-warn-handle").remove();
22+
$placeholder.append($warnHandle);
23+
}
24+
25+
function shutdown() {
26+
}
27+
28+
function init(plot, classes) {
29+
plot.hooks.draw.push(drawAlertHandles);
30+
plot.hooks.shutdown.push(shutdown);
31+
}
32+
33+
$.plot.plugins.push({
34+
init: init,
35+
options: options,
36+
name: 'navigationControl',
37+
version: '1.4'
38+
});
39+

0 commit comments

Comments
 (0)