优化页面
This commit is contained in:
@@ -33,23 +33,30 @@ Page({
|
||||
canvas: canvas
|
||||
});
|
||||
|
||||
console.log("onReady onReady start")
|
||||
console.log(ctx)
|
||||
console.log(canvas)
|
||||
console.log("onReady onReady end")
|
||||
})
|
||||
},
|
||||
|
||||
ontouchmove(e){
|
||||
console.log("ontouchmove ontouchmove ontouchmove");
|
||||
console.log(e);
|
||||
this.data.ctx.lineWidth = 5;
|
||||
this.data.ctx.lineCap="round";
|
||||
this.data.ctx.lineJoin ="round";
|
||||
this.data.ctx.lineTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY);
|
||||
this.data.ctx.lineTo(e.touches[0].x,e.touches[0].y);
|
||||
this.data.ctx.stroke();
|
||||
},
|
||||
ontouchstart(e){
|
||||
console.log("ontouchstart ontouchstart ontouchstart")
|
||||
this.setData({
|
||||
txt_show: false
|
||||
});
|
||||
console.log(this.data.ctx);
|
||||
this.data.ctx.beginPath();
|
||||
this.data.ctx.moveTo(e.changedTouches[0].pageX,e.changedTouches[0].pageY);
|
||||
this.data.ctx.moveTo(e.touches[0].x,e.touches[0].y);
|
||||
},
|
||||
|
||||
toClear() {
|
||||
|
||||
Reference in New Issue
Block a user