mirror of
https://github.com/balena-io/etcher.git
synced 2025-11-14 04:39:26 +00:00
Add button to burn the same image again. Fixes #74
This commit is contained in:
committed by
Juan Cruz Viotti
parent
1f3baf3f4d
commit
6331ee4aa1
@@ -18,6 +18,7 @@
|
||||
* @module ResinEtcher.selection-state
|
||||
*/
|
||||
|
||||
var _ = require('lodash');
|
||||
var angular = require('angular');
|
||||
var selectionState = angular.module('ResinEtcher.selection-state', []);
|
||||
|
||||
@@ -148,15 +149,25 @@ selectionState.service('SelectionStateService', function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Clear all selections
|
||||
* @summary Clear selections
|
||||
* @function
|
||||
* @public
|
||||
*
|
||||
* @param {Object} options - options
|
||||
* @param {Boolean} [options.preserveImage] - preserve image
|
||||
*
|
||||
* @example
|
||||
* SelectionStateService.clear();
|
||||
*
|
||||
* @example
|
||||
* SelectionStateService.clear({ preserveImage: true });
|
||||
*/
|
||||
this.clear = function() {
|
||||
selection = {};
|
||||
this.clear = function(options) {
|
||||
if (options && options.preserveImage) {
|
||||
selection = _.pick(selection, 'image');
|
||||
} else {
|
||||
selection = {};
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user