feat: override barcode svg width to fit in html area

This commit is contained in:
Shivam Mishra 2020-04-22 13:34:21 +05:30
parent 7fb8dac072
commit a555f9ed52

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();
}
},