diff --git a/app/assets/stylesheets/repository/repository_print_label_modal.scss b/app/assets/stylesheets/repository/repository_print_label_modal.scss index 80d5884ae..80a3e17b6 100644 --- a/app/assets/stylesheets/repository/repository_print_label_modal.scss +++ b/app/assets/stylesheets/repository/repository_print_label_modal.scss @@ -70,6 +70,10 @@ justify-content: center; min-height: 200px; padding: .5em 0; + + img { + max-width: 100%; + } } .label-template-option { diff --git a/app/javascript/vue/label_template/components/label_preview.vue b/app/javascript/vue/label_template/components/label_preview.vue index 5dc55ceec..4d6112380 100644 --- a/app/javascript/vue/label_template/components/label_preview.vue +++ b/app/javascript/vue/label_template/components/label_preview.vue @@ -130,6 +130,14 @@ }, zpl() { 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: {