0
是否可以使用KineticJS设置对象偏移量以便它不移动?设置KineticJS图像的偏移量而不移动
//this moves it
img.offsetX(100);
//this also moves it
img.offset({x:100,y:0};
我试过了;
img.setoffset({x:100,y:100});
但这似乎没有做任何事情?
我知道我可以设置偏移量,当我创建图像为;
var newImg = new Kinetic.Image({
x: x,
y: y,
image: imgObject,
name: 'image',
offset: {x:offX, y:offY}
})