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:
@@ -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);
|
||||
}
|
||||
/**
|
||||
|
Reference in New Issue
Block a user