1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-29 01:29:03 +02:00

fix for older ES6 browsers without ?? operator

This commit is contained in:
Pomax
2020-08-12 08:57:00 -07:00
parent 99e4015614
commit 6498341566
3 changed files with 4 additions and 4 deletions

View File

@@ -125,7 +125,7 @@ class GraphicsAPI extends BaseAPI {
* transforms: scale
*/
scale(x, y) {
y = y ?? x;
y = y ? y : x; // NOTE: this turns y=0 into y=x, which is fine. Scaling by 0 is really silly =)
this.ctx.scale(x, y);
}
/**