mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge pull request #605 from Sal0hcine/fix-reset-default-colours
Pressing "d" for default colors doesn't fully work. #601
This commit is contained in:
commit
61c76f980a
@ -92,7 +92,8 @@
|
||||
};
|
||||
|
||||
ns.PaletteController.prototype.resetColors = function () {
|
||||
pskl.app.selectedColorsService.reset();
|
||||
this.setPrimaryColor_(Constants.DEFAULT_PEN_COLOR);
|
||||
this.setSecondaryColor_(Constants.TRANSPARENT_COLOR);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user