Merge pull request #4554 from aignatov-bio/ai-sci-7367-fix-label-preview-in-print-modal

Fix label preview in print modal [SCI-7367]
This commit is contained in:
aignatov-bio 2022-10-20 11:02:46 +02:00 committed by GitHub
commit c7ee068893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -70,6 +70,10 @@
justify-content: center; justify-content: center;
min-height: 200px; min-height: 200px;
padding: .5em 0; padding: .5em 0;
img {
max-width: 100%;
}
} }
.label-template-option { .label-template-option {

View file

@ -130,6 +130,14 @@
}, },
zpl() { zpl() {
this.refreshPreview(); this.refreshPreview();
},
template() {
this.width = this.template.attributes.unit == 'in' ? this.template.attributes.width_mm / 25.4 : this.template.attributes.width_mm
this.height = this.template.attributes.unit == 'in' ? this.template.attributes.height_mm / 25.4 : this.template.attributes.height_mm
this.unit = this.template.attributes.unit
this.density = this.template.attributes.density
this.refreshPreview()
} }
}, },
methods: { methods: {