mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Issue #750 - drawing tests: always initialize penSize before starting test
This commit is contained in:
parent
87893bb4ac
commit
0eface45f1
@ -32,6 +32,7 @@
|
||||
};
|
||||
|
||||
ns.DrawingTestPlayer.prototype.setupInitialState_ = function () {
|
||||
|
||||
var size = this.initialState.size;
|
||||
var piskel = this.createPiskel_(size.width, size.height);
|
||||
pskl.app.piskelController.setPiskel(piskel);
|
||||
@ -39,9 +40,10 @@
|
||||
$.publish(Events.SELECT_PRIMARY_COLOR, [this.initialState.primaryColor]);
|
||||
$.publish(Events.SELECT_SECONDARY_COLOR, [this.initialState.secondaryColor]);
|
||||
$.publish(Events.SELECT_TOOL, [this.initialState.selectedTool]);
|
||||
if (this.initialState.penSize) {
|
||||
|
||||
// Old tests do not have penSize stored in initialState, fallback to 1.
|
||||
var penSize = this.initialState.penSize || 1;
|
||||
pskl.app.penSizeService.setPenSize(this.initialState.penSize);
|
||||
}
|
||||
};
|
||||
|
||||
ns.DrawingTestPlayer.prototype.createPiskel_ = function (width, height) {
|
||||
|
Loading…
Reference in New Issue
Block a user