|
@@ -23,7 +23,11 @@
|
|
/>
|
|
/>
|
|
<!-- 编辑区域 -->
|
|
<!-- 编辑区域 -->
|
|
<div class="edit-area">
|
|
<div class="edit-area">
|
|
- <div class="container" id="h5editor" :style="{transform:`scale(${zoomNum},${zoomNum})`}">
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="container"
|
|
|
|
+ id="h5editor"
|
|
|
|
+ :style="{transform:`scale(${zoomNum},${zoomNum})`+`translate(${translateX}px,${translateY}px)`}"
|
|
|
|
+ >
|
|
<elab-canvas
|
|
<elab-canvas
|
|
v-show="animatedNameGlobal!=''"
|
|
v-show="animatedNameGlobal!=''"
|
|
:width="750"
|
|
:width="750"
|
|
@@ -701,7 +705,9 @@ export default {
|
|
selectedButtom: false,
|
|
selectedButtom: false,
|
|
|
|
|
|
canSave: false,
|
|
canSave: false,
|
|
- zoomNum: 1
|
|
|
|
|
|
+ zoomNum: 1,
|
|
|
|
+ translateX: 360,
|
|
|
|
+ translateY: 100
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -854,13 +860,16 @@ export default {
|
|
},
|
|
},
|
|
zoom(isAdd) {
|
|
zoom(isAdd) {
|
|
var zooms = [0.2, 0.3, 0.5, 0.75, 0.8, 0.9, 1, 1.2, 1.5, 2, 3, 4];
|
|
var zooms = [0.2, 0.3, 0.5, 0.75, 0.8, 0.9, 1, 1.2, 1.5, 2, 3, 4];
|
|
|
|
+ var translateYs = [80, 80, 80, 80, 80, 90, 100, 150, 200, 250, 300, 330];
|
|
if (isAdd) {
|
|
if (isAdd) {
|
|
if (this.zoomNum <= 3) {
|
|
if (this.zoomNum <= 3) {
|
|
this.zoomNum = zooms[zooms.indexOf(this.zoomNum) + 1];
|
|
this.zoomNum = zooms[zooms.indexOf(this.zoomNum) + 1];
|
|
|
|
+ this.translateY = translateYs[zooms.indexOf(this.zoomNum)];
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (this.zoomNum > 0.2) {
|
|
if (this.zoomNum > 0.2) {
|
|
this.zoomNum = zooms[zooms.indexOf(this.zoomNum) - 1];
|
|
this.zoomNum = zooms[zooms.indexOf(this.zoomNum) - 1];
|
|
|
|
+ this.translateY = translateYs[zooms.indexOf(this.zoomNum)];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1088,7 +1097,7 @@ export default {
|
|
tools.vue2json(this.$store.state.editor.editorTheme)
|
|
tools.vue2json(this.$store.state.editor.editorTheme)
|
|
)
|
|
)
|
|
.then(() => {
|
|
.then(() => {
|
|
- var param= setTimeout(() => {
|
|
|
|
|
|
+ var param = setTimeout(() => {
|
|
this.showPreView = true;
|
|
this.showPreView = true;
|
|
this.isLoadingPreview = false;
|
|
this.isLoadingPreview = false;
|
|
}, 1000);
|
|
}, 1000);
|
|
@@ -1256,7 +1265,6 @@ export default {
|
|
var param = setTimeout(() => {
|
|
var param = setTimeout(() => {
|
|
that.selectedButtom = true;
|
|
that.selectedButtom = true;
|
|
}, 1);
|
|
}, 1);
|
|
-
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
img.src = res;
|
|
img.src = res;
|
|
@@ -1288,12 +1296,11 @@ export default {
|
|
var param = setTimeout(() => {
|
|
var param = setTimeout(() => {
|
|
that.selectedButtom = true;
|
|
that.selectedButtom = true;
|
|
}, 1);
|
|
}, 1);
|
|
-
|
|
|
|
|
|
+
|
|
that.unSelectedButtom = false;
|
|
that.unSelectedButtom = false;
|
|
var param2 = setTimeout(() => {
|
|
var param2 = setTimeout(() => {
|
|
that.unSelectedButtom = true;
|
|
that.unSelectedButtom = true;
|
|
}, 1);
|
|
}, 1);
|
|
-
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
img.src = res;
|
|
img.src = res;
|
|
@@ -1364,14 +1371,12 @@ export default {
|
|
var params = setTimeout(() => {
|
|
var params = setTimeout(() => {
|
|
that.selectedButtom = true;
|
|
that.selectedButtom = true;
|
|
}, 1);
|
|
}, 1);
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
that.buttonData.backgroundUnselectedImg = res;
|
|
that.buttonData.backgroundUnselectedImg = res;
|
|
that.unSelectedButtom = false;
|
|
that.unSelectedButtom = false;
|
|
var param = setTimeout(() => {
|
|
var param = setTimeout(() => {
|
|
that.unSelectedButtom = true;
|
|
that.unSelectedButtom = true;
|
|
}, 1);
|
|
}, 1);
|
|
-
|
|
|
|
}
|
|
}
|
|
that.buttonData.itemId = that.itemId;
|
|
that.buttonData.itemId = that.itemId;
|
|
that.buttonData.width = img.width;
|
|
that.buttonData.width = img.width;
|
|
@@ -1639,8 +1644,6 @@ export default {
|
|
.container {
|
|
.container {
|
|
height: 100%;
|
|
height: 100%;
|
|
width: 770px;
|
|
width: 770px;
|
|
- margin-left: 360px;
|
|
|
|
- margin-top: 100px;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.control-panel {
|
|
.control-panel {
|