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 版本。鼠标事件在这里不起作用。我不知道原因。你能帮我吗。
谢谢维杰