【发布时间】:2013-03-29 16:39:03
【问题描述】:
我想用 dragBounds 将我的舞台上、左、右、下限拖动,但它不起作用
var stage = new Kinetic.Stage({
container: 'container',
width: 578,
height: 363,
draggable: true,
dragBoundFunc: function(pos) {
var newY = pos.y < 50 ? 50 : pos.y;
return {
x: pos.x,
y: newY
};
},
dragBounds: { // it's not running
top: 10,
bottom: 300,
left: 0,
right: 500
}
});
【问题讨论】:
标签: javascript canvas html5-canvas kineticjs