Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Sep 5, 2019
1 parent a135777 commit 9a9422a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/assets/js/kontra.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions kontra.js
Original file line number Diff line number Diff line change
Expand Up @@ -2686,12 +2686,16 @@ class Sprite {
}

set width(value) {
this._fx = value < 0 ? -1 : 1;
this._w = Math.abs(value);
let sign = value < 0 ? -1 : 1;

this._fx = sign;
this._w = value * sign;
}
set height(value) {
this._fy = value < 0 ? -1 : 1;
this._h = Math.abs(value);
let sign = value < 0 ? -1 : 1;

this._fy = sign;
this._h = value * sign;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion kontra.min.js

Large diffs are not rendered by default.

0 comments on commit 9a9422a

Please sign in to comment.