diff --git a/build/browser/app.js b/build/browser/app.js index 15ad827d..36d5f843 100644 --- a/build/browser/app.js +++ b/build/browser/app.js @@ -343,12 +343,16 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { var self = this; var burning = false; - /** - * @summary Progress percentage - * @type Number - * @public - */ - this.progress = 0; + this.state = { + + /** + * @summary Progress percentage + * @type Number + * @public + */ + progress: 0 + + }; /** * @summary Set progress percentage @@ -364,8 +368,8 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { // Safely bring the state to the world of Angular $timeout(function() { - self.progress = Math.floor(progress); - console.debug('Progress: ' + self.progress); + self.state.progress = Math.floor(progress); + console.debug('Progress: ' + self.state.progress); }); }; @@ -431,7 +435,7 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { * @public * * @description - * This function will update `.progress` with the current writing percentage. + * This function will update `state.progress` with the current writing percentage. * * @param {String} image - image path * @param {Object} drive - drive diff --git a/lib/browser/modules/image-writer.js b/lib/browser/modules/image-writer.js index 86120e40..6fd3ef72 100644 --- a/lib/browser/modules/image-writer.js +++ b/lib/browser/modules/image-writer.js @@ -35,12 +35,16 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { var self = this; var burning = false; - /** - * @summary Progress percentage - * @type Number - * @public - */ - this.progress = 0; + this.state = { + + /** + * @summary Progress percentage + * @type Number + * @public + */ + progress: 0 + + }; /** * @summary Set progress percentage @@ -56,8 +60,8 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { // Safely bring the state to the world of Angular $timeout(function() { - self.progress = Math.floor(progress); - console.debug('Progress: ' + self.progress); + self.state.progress = Math.floor(progress); + console.debug('Progress: ' + self.state.progress); }); }; @@ -123,7 +127,7 @@ imageWriter.service('ImageWriterService', function($q, $timeout) { * @public * * @description - * This function will update `.progress` with the current writing percentage. + * This function will update `state.progress` with the current writing percentage. * * @param {String} image - image path * @param {Object} drive - drive diff --git a/lib/index.html b/lib/index.html index bae6774a..3bf32e5b 100644 --- a/lib/index.html +++ b/lib/index.html @@ -19,7 +19,7 @@