Merge pull request #10050 from scmmishra/barcode-width

fix: Override barcode svg width to fit in html area
This commit is contained in:
mergify[bot] 2020-04-25 05:31:01 +00:00 committed by GitHub
commit 4bddb0b9f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,7 @@ frappe.ui.form.ControlBarcode = frappe.ui.form.ControlData.extend({
const svg = this.barcode_area.find('svg')[0];
JsBarcode(svg, value, this.get_options(value));
$(svg).attr('data-barcode-value', value);
$(svg).attr('width', '100%');
return this.barcode_area.html();
}
},