Skip to content

Commit fb9c307

Browse files
committed
changed reset position bug on route change
1 parent 4ba53fa commit fb9c307

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Canvas.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}">
1515
<!-- This is the actual component box -->
1616
<!-- https://www.npmjs.com/package/vue-draggable-resizable -->
17-
<p class="cssContainerText"> APP PREVIEW </p>
17+
<p class="cssContainerText"> {{this.activeRoute}} Preview </p>
1818
<!--each component box in canvas will have these properties-->
1919
<!-- :onDragStart="recordInitialPosition" :onResizeStart="recordInitialSize" :preventDeactivation="true" graveyard attribute -->
2020
<vue-draggable-resizable
@@ -26,9 +26,9 @@
2626
:x="componentData.x"
2727
:y="componentData.y"
2828
:z="componentData.z"
29-
:w="2 * gridWidth"
29+
:w="componentData.w ? componentData.w:2 * gridWidth"
3030
:min-width="gridWidth / 2"
31-
:h="2 * gridHeight"
31+
:h="componentData.h ? componentData.h:2 * gridHeight"
3232
:min-height="gridHeight / 2"
3333
:grid="[Math.floor(100 * gridWidth) / 100, Math.floor(100 * gridHeight) / 100 ]"
3434
@activated="onActivated(componentData)"

0 commit comments

Comments
 (0)