1
this.prototype.bounding = new Kinetic.Shape(function () {
    var context = this.getContext();
    context.beginPath();
    context.arc(0, 0, radius, 0, 2 * Math.PI, false);
    context.fillStyle = color;
    context.fill();
},"PerspectiveCar");
this.prototype.bounding.vx = 0;
this.prototype.bounding.vy = 0;
this.prototype.bounding.x = positionX;
this.prototype.bounding.y = positionY;    
this.prototype.bounding.on("mousedown", function () {
        alert('Hi');
});

嗨,我使用的是 KineticJS 3.6 版本。鼠标事件在这里不起作用。我不知道原因。你能帮我吗。

谢谢维杰

4

1 回答 1

0

它也不适用于“点击”?

this.prototype.bounding.on("click", function () {
        alert('Hi');
});
于 2013-05-07T12:43:16.480 回答