【发布时间】:2014-10-24 15:12:22
【问题描述】:
我试试这个:
function MovableLine (line, number) {
this.line = line;
this.number = number;
}
MovableLine.prototype.start = function (e) {
alert(this.number);
alert(this);
};
然后:
var mline = this.xAxis[0].plotLinesAndBands[plotLinesCount].svgElem;
mline.css({
'cursor': 'pointer'
});
mline.translate(0, 0);
movableLine = new MovableLine(mline, 10);
movableLine.line.on('mousedown', movableLines[plotLinesCount].start);
结果:
第一个警报:未定义
第二个警报:对象 SWGPathElement
如何从 start() 获取我的对象可移动线?
【问题讨论】:
-
您在哪里创建和添加到可移动线?
标签: jquery highcharts jquery-on