| | |
| | | panoramaPath: '', |
| | | cameraData: [], |
| | | fixedW: 960, |
| | | fixedH: 540, |
| | | fixedH: 700, |
| | | imgW: 0, |
| | | imgH: 0, |
| | | traceX: 0, |
| | |
| | | ></canvas> --> |
| | | <canvas |
| | | ref="trackArea" |
| | | width="960" |
| | | height="540" |
| | | :width="fixedW" |
| | | :height="fixedH" |
| | | :style="{backgroundImage:`url(${panoramaPath})`,backgroundSize:`${bgW}px ${bgH}px`}" |
| | | ></canvas> |
| | | </div> |
| | |
| | | searchStartTimeStamp: 0, |
| | | searchEndTimeStamp: 0, |
| | | fixedW: 960, |
| | | fixedH: 540, |
| | | fixedH: 700, |
| | | bgW: 0, |
| | | bgH: 0 |
| | | } |
| | |
| | | getPanoramaPic().then(res => { |
| | | let { panoramaPath, width, height } = res.data; |
| | | _this.panoramaPath = panoramaPath + '?' + Math.random(); |
| | | //_this.cW = width; |
| | | //_this.cH = height; |
| | | _this.cW = width; |
| | | _this.cH = height; |
| | | //判断长宽比 |
| | | let ratio = res.data.width/res.data.height; |
| | | if(ratio > (_this.fixedW/_this.fixedH)){ |