This commit is contained in:
Torkel Ödegaard 2016-06-11 14:37:52 +02:00
parent 0b919c752b
commit f387e39b67

View File

@ -0,0 +1,39 @@
///<reference path="../../../headers/common.d.ts" />
import 'jquery.flot';
import $ from 'jquery';
var options = {};
function getHandleTemplate(type) {
return `
<div class="alert-handle" style="position: absolute; top: 100px; right: -50px;">
<i class="icon-gf icon-gf-${type} alert-icon-${type}"></i>
> 100
</div>
`;
}
function drawAlertHandles(plot, canvascontext) {
var $warnHandle = $(getHandleTemplate('warn'));
var $placeholder = plot.getPlaceholder();
$placeholder.find(".alert-warn-handle").remove();
$placeholder.append($warnHandle);
}
function shutdown() {
}
function init(plot, classes) {
plot.hooks.draw.push(drawAlertHandles);
plot.hooks.shutdown.push(shutdown);
}
$.plot.plugins.push({
init: init,
options: options,
name: 'navigationControl',
version: '1.4'
});