我正在使用hammerJs V1.0.7没有错误,当我想要更改为最新版本的HammerJs时,但我向我显示错误,未捕获TypeError:无法设置属性'touchAction'未定义,有谁知道如何解决错误?谢谢,我正在对我的图像进行多点触控绑定以缩放和旋转它。
var image = new Kinetic.Image({
image : imageObj,
draggable : true,
x: stage.getWidth()/4,
y: stage.getHeight()/4,
width: stage.getWidth() / 2,
height: stage.getHeight() / 2,
visible: false,
});
layer1.add(image);
layer1.draw();
var startScale = 1;
var startRotate = 0;
var hammertime = Hammer(image);
hammertime.get('rotate').set({ enable: true });
hammertime.get('pinch').set({ enable: true });
hammertime.on("rotate", function(e) {
startScale = image.pinchX();
startRotate = image.rotation();
}).on("rotate", function(e) {
image.pinch({
x : startScale * e.gesture.pinch,
y : startScale * e.gesture.pinch,
});
image.rotation(startRotate + e.gesture.rotation);
layer1.draw();
});