|
@@ -238,7 +238,6 @@ const app = new Vue({
|
|
if (event.val === "connected") {
|
|
if (event.val === "connected") {
|
|
Toast.clear();
|
|
Toast.clear();
|
|
this.doConnectDirectives()
|
|
this.doConnectDirectives()
|
|
- this.confirmResolution()
|
|
|
|
playOnBtn.bind(this)()
|
|
playOnBtn.bind(this)()
|
|
this.pushflowPopup()
|
|
this.pushflowPopup()
|
|
this.getResidueTime()
|
|
this.getResidueTime()
|
|
@@ -309,7 +308,6 @@ const app = new Vue({
|
|
|
|
|
|
// 确定修改分辨率
|
|
// 确定修改分辨率
|
|
confirmResolution() {
|
|
confirmResolution() {
|
|
- if (!Object.keys(this.phoneSize).length) return
|
|
|
|
let { width, height, dpi: density } = this.phoneSize
|
|
let { width, height, dpi: density } = this.phoneSize
|
|
this.engine.makeResolution({ width, height, density })
|
|
this.engine.makeResolution({ width, height, density })
|
|
this.resolutionRatioVisible = false
|
|
this.resolutionRatioVisible = false
|
|
@@ -378,9 +376,13 @@ const app = new Vue({
|
|
// 分辨率
|
|
// 分辨率
|
|
case 'getPhoneSize':
|
|
case 'getPhoneSize':
|
|
case 'setPhoneSize':
|
|
case 'setPhoneSize':
|
|
- let { width, height, dpi: density } = result.data
|
|
|
|
- this.phoneSize = result.data
|
|
|
|
- this.engine.makeResolution({ width, height, density })
|
|
|
|
|
|
+ let data = JSON.parse(JSON.stringify(result.data))
|
|
|
|
+ let { width, height } = data
|
|
|
|
+ if (width > height) {
|
|
|
|
+ data.width = height
|
|
|
|
+ data.height = width
|
|
|
|
+ }
|
|
|
|
+ this.phoneSize = data
|
|
break
|
|
break
|
|
// 云机复制过来的文本
|
|
// 云机复制过来的文本
|
|
case 'reProduceText':
|
|
case 'reProduceText':
|