0
註銷滾動我有kineticjs創建在480 * 960 大小的畫布問題是,當我查看我的手機我不能滾動比帆布下一個頁面。帆布
我如何註銷觸摸事件的舞臺?
我的代碼與此類似:
<div id="container"></div>
<div id="other">other stuff</div>
var stage = new Kinetic.Stage({
container: 'container',
width: 480,
height: 960
});
var uploaded;
var mask;
var layer = new Kinetic.Layer();
var imageObj = new Image();
var maskObj = new Image();
mask = new Kinetic.Image({
x: 130,
y: 50,
image: maskObj,
width: newwidth,
height: newheight
});
uploaded = new Kinetic.Image({
x: 105,
y: 130,
image: imageObj,
width: 160,
height: 240,
offset: [95,120],
draggable: true
});
imageObj.onload = function() {
layer.add(mask);
layer.add(uploaded);
stage.add(layer);
uploaded.on('mouseout', function() {
document.body.style.cursor = 'default';
});
uploaded.on('mouseover', function() {
document.body.style.cursor = 'pointer';
});
mask.on('mouseover', function() {
document.body.style.cursor = 'default';
});
};
imageObj.src = 'pic1.png';
maskObj.src = 'pic2.png';