From c582e7ae46609c97089f4569505b2e33c11ad5ba Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Tue, 26 Sep 2017 09:43:55 +0530 Subject: [PATCH] fixed codacy --- frappe/public/js/frappe/ui/capture.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frappe/public/js/frappe/ui/capture.js b/frappe/public/js/frappe/ui/capture.js index 9ce7b8431e..1b1d2ff2f0 100644 --- a/frappe/public/js/frappe/ui/capture.js +++ b/frappe/public/js/frappe/ui/capture.js @@ -1,13 +1,9 @@ -frappe.ui.Capture = class +frappe.ui.Capture = class { - constructor (options) + constructor (options = { }) { - this.options = - { - width: 480, height: 320, flip_horiz: true - }; - - this.dialog = new frappe.ui.Dialog(); + this.options = Object.assign({}, frappe.ui.Capture.DEFAULT_OPTIONS, options); + this.dialog = new frappe.ui.Dialog(); this.template = `
@@ -91,4 +87,8 @@ frappe.ui.Capture = class $(this.dialog.$wrapper).remove(); } -}; \ No newline at end of file +}; +frappe.ui.Capture.DEFAULT_OPTIONS = +{ + width: 480, height: 320, flip_horiz: true +} \ No newline at end of file