|
71 | 71 | <!-- make device size and scale -->
|
72 | 72 | <!-- bgcolor and text color apply -->
|
73 | 73 | <div id="mobile" :style="'width:'+(display.landscape?display.height:display.width )* display.scale
|
74 |
| - +'px;height:'+(display.landscape?display.width:display.height ) * display.scale+'px'" :class="(data.pages.length < 1?'inactive':'')"> |
75 |
| - <div id="preview" :style="';background-color:'+(data.project.isDark?'#2e2e2e':data.project.bgColor) |
76 |
| - +';color:'+(data.project.isDark?'white':data.project.textColor)+' !important' "> |
| 74 | + +'px;height:'+(display.landscape?display.width:display.height ) * display.scale+'px;'+'background-color:'+(data.project.isDark?'#2e2e2e':data.project.bgColor) |
| 75 | + +';color:'+(data.project.isDark?'white':data.project.textColor)+' !important' " |
| 76 | + :class="(data.pages.length < 1?'inactive':'')"> |
77 | 77 |
|
78 |
| - <!-- direction of project and page padding --> |
79 |
| - <div id="dir" |
80 |
| - :style="'direction:'+(data.project.isRTL?'rtl':'ltr')+';padding:'+calcPadding(data.pages[currentPage].padding,this.display.scale)"> |
81 |
| - <!-- visual components of page --> |
82 |
| - <div |
83 |
| - v-if="data.pages[currentPage] !== undefined && data.pages[currentPage].children.visual !== undefined"> |
| 78 | + <div id="preview"> |
| 79 | + <div :style="'background-color:'+(data.project.isDark?'#2e2e2e':data.project.bgColor) |
| 80 | + +';color:'+(data.project.isDark?'white':data.project.textColor)+' !important' "> |
| 81 | + <!-- direction of project and page padding --> |
| 82 | + <div id="dir" |
| 83 | + :style="'direction:'+(data.project.isRTL?'rtl':'ltr')+';padding:'+calcPadding(data.pages[currentPage].padding,this.display.scale)"> |
| 84 | + <!-- visual components of page --> |
| 85 | + <div |
| 86 | + v-if="data.pages[currentPage] !== undefined && data.pages[currentPage].children.visual !== undefined"> |
84 | 87 | <span v-for="(comp,i) in data.pages[currentPage].children.visual"
|
85 | 88 | :key="i">
|
86 | 89 | <simulator @dblclick.native="removeVisual(i)" @click.native="currentProperties = comp;"
|
87 | 90 | :type="comp.type" :properties="comp" :scale="display.scale"
|
88 | 91 | :page="data.pages[currentPage]"></simulator>
|
89 | 92 | </span>
|
| 93 | + </div> |
90 | 94 | </div>
|
91 | 95 |
|
92 | 96 | <drop class="drop visual" @drop="onVisualDrop" :accepts-data="(n) => isVisual(n)"></drop>
|
|
126 | 130 | </h2>
|
127 | 131 | <!-- if project init sho properties-->
|
128 | 132 | <div v-if="isInitProject">
|
129 |
| - <property :properties="currentProperties" :page="data.pages[currentPage]"></property> |
| 133 | + <property :properties="currentProperties" :page="currentPage"></property> |
130 | 134 | </div>
|
131 | 135 | <div v-else class="text-center">
|
132 | 136 | <img src="../../assets/img/logo.svg" class="logo-sm" alt="">
|
|
140 | 144 | <!-- list of pages -->
|
141 | 145 | <page v-for="(page,i) in data.pages" :image="page.image!= undefined? page.image: null"
|
142 | 146 | :isMain="data.project.mainPage === i" @click.native="changePage(i)" :key="i" :title="page.name"
|
143 |
| - :active="currentPage === i"> |
| 147 | + :active="currentPage === i" :bg="(data.project.isDark?'#2e2e2e':data.project.bgColor)"> |
144 | 148 | <i class="fa fa-times" @click="removePage(i)"></i>
|
145 | 149 | </page>
|
146 | 150 | <i class="fa fa-plus-circle" id="page-add" @click="newPage"></i>
|
@@ -300,9 +304,10 @@ export default {
|
300 | 304 | }
|
301 | 305 | } while (nextName);
|
302 | 306 | visuals[visuals.length - 1].name = component.type + i.toString();
|
303 |
| -
|
| 307 | + // update page preview |
304 | 308 | setTimeout(function () {
|
305 | 309 | fnc.takeScreenShot("#preview", function (e) {
|
| 310 | + console.log(self.data.pages[self.currentPage].name); |
306 | 311 | self.data.pages[self.currentPage].image = e;
|
307 | 312 | });
|
308 | 313 | }, 1000);
|
@@ -443,6 +448,7 @@ export default {
|
443 | 448 | top: 0;
|
444 | 449 | color: red;
|
445 | 450 | font-size: 18px;
|
| 451 | + z-index: 999; |
446 | 452 | }
|
447 | 453 |
|
448 | 454 | #page-add {
|
|
0 commit comments