Closed jfustier closed 5 years ago
May I see the template?
I use an another components : https://github.com/mauricius/vue-draggable-resizable
<div v-if="edit" ref="printMe" class="col-lg-6 offset-lg-3 col-md-10 offset-md-1 col-sm-12 mt-3 mb-3 draggableContainer" v-bind:style="{backgroundColor : model.colors.background}">
<!-- Qrcode -->
<v-draggable-resizable v-if="model.objects.qrcode.active" ref="qrcode"
:x="model.objects.qrcode.x"
:y="model.objects.qrcode.y"
:w="model.objects.qrcode.width"
:h="model.objects.qrcode.height"
@dragging="onDragQrcode" @resizing="onResizeQrcode" :parent="true">
<img :src="qrcode" class="QRcode" />
</v-draggable-resizable>
<!-- Logo -->
<v-draggable-resizable v-if="model.objects.logo.active" ref="logo"
:x="model.objects.logo.x"
:y="model.objects.logo.y"
:w="model.objects.logo.width"
:h="model.objects.logo.height"
@dragging="onDragLogo" @resizing="onResizeLogo" :parent="true">
<p v-if="!model.upload.name" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.text}">Logo</p>
<img v-else :src="this.$baseURL + '/uploads/' + model.upload.name" alt="Mon logo" />
</v-draggable-resizable>
<!-- Title -->
<v-draggable-resizable v-if="model.objects.title.active" ref="title"
:x="model.objects.title.x"
:y="model.objects.title.y"
:w="model.objects.title.width"
:h="model.objects.title.height"
@dragging="onDragTitle" @resizing="onResizeTitle" :parent="true">
<p v-if="!model.fields.title" v-bind:class="model.textPositions.title" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.title}">Title</p>
<p v-else v-bind:class="model.textPositions.title" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.title}">{{ model.fields.title }}</p>
</v-draggable-resizable>
<!-- Description -->
<v-draggable-resizable v-if="model.objects.description.active" ref="description"
:x="model.objects.description.x"
:y="model.objects.description.y"
:w="model.objects.description.width"
:h="model.objects.description.height"
@dragging="onDragDescription" @resizing="onResizeDescription" :parent="true">
<p v-if="!model.fields.description" v-bind:class="model.textPositions.description" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.text}">Description</p>
<p v-else v-bind:class="model.textPositions.description" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.text}">{{ model.fields.description }}</p>
</v-draggable-resizable>
<!-- Price -->
<v-draggable-resizable v-if="model.objects.price.active" ref="price"
:x="model.objects.price.x"
:y="model.objects.price.y"
:w="model.objects.price.width"
:h="model.objects.price.height"
@dragging="onDragPrice" @resizing="onResizePrice" :parent="true">
<p v-bind:class="model.textPositions.price" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.price}">15.00 €</p>
</v-draggable-resizable>
<!-- Item name -->
<v-draggable-resizable v-if="model.objects.itemName.active" ref="itemName" :x="model.objects.itemName.x"
:y="model.objects.itemName.y"
:w="model.objects.itemName.width"
:h="model.objects.itemName.height"
@dragging="onDragItemName" @resizing="onResizeItemName" :parent="true">
<p v-bind:class="model.textPositions.itemName" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.itemName}">Item name</p>
</v-draggable-resizable>
<!-- Reference -->
<v-draggable-resizable v-if="model.objects.ref.active" ref="ref"
:x="model.objects.ref.x"
:y="model.objects.ref.y"
:w="model.objects.ref.width"
:h="model.objects.ref.height"
@dragging="onDragRef" @resizing="onResizeRef" :parent="true">
<p v-bind:class="model.textPositions.ref" v-bind:style="{color : model.colors.text, fontSize : model.fontSize.ref}">Reference</p>
</v-draggable-resizable>
</div>
Can you add this below the const el = this.$refs.printMe;
and show me the output?
console.warn(this.edit, el);
uninstall & reinstall have solved this issue for me..
Does it? Good to hear that. I shall close this issue now.
My method :
When print function is executed :
Package.json :