这是一个用于在高图中存储注释的代码我想做这样的事情但是为了调整我的运行时添加的SVG注释。
我该怎么做?
这是我的代码:
storeAnnotation: function(event, annotation, chart) {
if(!chart.annotationDraging) {
event.stopPropagation();
event.preventDefault();
}
if((!isOldIE && event.button === 0) || (isOldIE && event.button === 1)) {
var posX = event.pageX,
posY = event.pageY;
chart.activeAnnotation = annotation;
chart.activeAnnotation.startX = posX;
chart.activeAnnotation.startY = posY;
chart.activeAnnotation.transX = 0;
chart.activeAnnotation.transY = 0;
//translateAnnotation(event);
addEvent(document, 'mousemove', function(e){
annotation.events.translateAnnotation(e, chart);
});
//addEvent(chart.container, 'mouseleave', releaseAnnotation); TO BE OR NOT TO BE?
}
}