Commit 4a5e7a59 authored by lvtz's avatar lvtz

fix

parent 972d8210
......@@ -9,6 +9,7 @@
bindtouchend="bindtouchend"
bindtouchmove="bindtouchmove"
wx:if="{{canvasShow && step!=1 && !hideCanvas}}"
disable-scroll='true'
>
</canvas>
......@@ -17,6 +18,7 @@
canvas-id="tempCanvas2"
style="position:absolute; width:{{imgWidth}}px;height:{{imgHeight}}px;top:{{imgTop}}px;left:{{imgLeft}}px; z-index: 9"
wx:if="{{!canvasShow && !hideCanvas}}"
disable-scroll='true'
>
</canvas>
<!-- <cover-view class="" wx:if="{{medalModal}}" catchtap="closeModal"></cover-view> -->
......
......@@ -65,6 +65,7 @@ Page({
id: 0,
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
statusBarHeight: app.globalData.statusBarHeight,
// drawinfo: {"audio":,"drawTrail":}
audioInfo: {"src":"","duration":0},
drawTrail: [],
......@@ -164,6 +165,7 @@ Page({
loadImgOnImage(self){
let that = this;
wxGetImageInfo({src: imagify(this.data.src)}).then((res)=>{
console.log(res,'222')
self.initRatio = res.height / self.imgViewHeight //转换为了px 图片原始大小/显示大小
if (self.initRatio < res.width / (750 * self.deviceRatio)) {
self.initRatio = res.width / (750 * self.deviceRatio)
......@@ -181,21 +183,20 @@ Page({
imgHeight: self.scaleHeight,
imgTop: self.startY,
imgLeft: self.startX
},()=>{
this.data.drawTrail.forEach(item => {
if(item.type=='line'){
item.x = item.x * this.data.imgWidth;
item.y = item.y * this.data.imgHeight;
}
});
this.data.copyDrawTrail.forEach(item => {
if(item.type=='line'){
item.x = item.x * this.data.imgWidth;
item.y = item.y * this.data.imgHeight;
}
});
this.play();
})
this.data.drawTrail.forEach(item => {
if(item.type=='line'){
item.x = item.x * this.data.imgWidth;
item.y = item.y * this.data.imgHeight;
}
});
this.data.copyDrawTrail.forEach(item => {
if(item.type=='line'){
item.x = item.x * this.data.imgWidth;
item.y = item.y * this.data.imgHeight;
}
});
this.play();
}).catch(()=>{
})
......
......@@ -33,11 +33,11 @@
<block wx:if="{{type == 1}}">
<canvas
canvas-id="tempCanvas"
style="position:absolute; width:{{imgWidth}}px;height:{{imgHeight}}px;top:{{imgTop}}px;left:{{imgLeft}}px; z-index: 9"
style="position:absolute; width:{{imgWidth}}px;height:{{imgHeight}}px;top:{{imgTop}}px;left:{{imgLeft}}px; z-index: 9" disable-scroll="true"
>
</canvas>
<image class="init-image" src="{{filter.imagify(src, 'image/resize,w_750/format,jpg/quality,q_60')}}" mode="aspectFit" style="position:absolute; width:{{imgWidth}}px;height:{{imgHeight}}px;top:{{imgTop}}px;left:{{imgLeft}}px;" disable-scroll="true"></image>
</block>>
</block>
<cover-view class="flowerbox" wx:for="{{flowergivenarr}}" wx:key="index" animation="{{floweranimatedata}}">
<cover-image class="floweritem" src="{{imageRoot}}2c/common/bigflower.png?{{imageVersion}}"></cover-image>
</cover-view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment