Removed reset from SelectedColorsService and implemented the reset in PaletteController

This commit is contained in:
Nick Garland 2017-01-04 18:28:58 +00:00
parent aa5d4d4090
commit 5bd113b38f
2 changed files with 4 additions and 7 deletions

View File

@ -92,7 +92,8 @@
};
ns.PaletteController.prototype.resetColors = function () {
pskl.app.selectedColorsService.reset();
this.setPrimaryColor_(Constants.DEFAULT_PEN_COLOR);
this.setSecondaryColor_(Constants.TRANSPARENT_COLOR);
};
/**

View File

@ -2,7 +2,8 @@
var ns = $.namespace('pskl.service');
ns.SelectedColorsService = function () {
this.reset();
this.primaryColor_ = Constants.DEFAULT_PEN_COLOR;
this.secondaryColor_ = Constants.TRANSPARENT_COLOR;
};
ns.SelectedColorsService.prototype.init = function () {
@ -18,11 +19,6 @@
return this.secondaryColor_;
};
ns.SelectedColorsService.prototype.reset = function () {
this.primaryColor_ = Constants.DEFAULT_PEN_COLOR;
this.secondaryColor_ = Constants.TRANSPARENT_COLOR;
};
ns.SelectedColorsService.prototype.onPrimaryColorUpdate_ = function (evt, color) {
this.primaryColor_ = color;
};