canvas中的图片能不能移动?
onLoad(){
var that=this;
wx.getSystemInfo({
success: function (res) {
console.log(res)
that.setData({
width: res.windowWidth ,
height: res.windowHeight
})
var ctx = wx.createCanvasContext(‘canvas’);
ctx.drawImage(‘https://xxxxx.jpg’, -200, -200, res.windowWidth*2, res.windowHeight*2);
ctx.draw();
}
})
},这样设置一张图片能不能让他在canvas容器内上下左右移动(类似于腾讯地图那样 可以随意拖动)
跪求大神解答