aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-18 01:45:19 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-18 01:45:19 -0500
commit4ae8e7791d217a04a913caa75c8e276a50608865 (patch)
tree8ce5a8f882f99f72f1c6c04dfd8e46f1f9cb2a6b /src/client/util
parentbc7a13cb54d3f60b4e9ad301d17db2941eb84912 (diff)
Fixed up a bunch of tranform stuff
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/Transform.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/Transform.ts b/src/client/util/Transform.ts
index 8ae3f837f..9fd4f7bef 100644
--- a/src/client/util/Transform.ts
+++ b/src/client/util/Transform.ts
@@ -38,8 +38,8 @@ export class Transform {
}
transform = (transform: Transform): Transform => {
- this._translateX += transform._translateX * this._scale;
- this._translateY += transform._translateY * this._scale;
+ this._translateX = transform._translateX + transform._scale * this._translateX;
+ this._translateY = transform._translateY + transform._scale * this._translateY;
this._scale *= transform._scale;
return this;
}
@@ -56,8 +56,8 @@ export class Transform {
}
preTransform = (transform: Transform): Transform => {
- this._translateX = transform._translateX + this._translateX * transform._scale;
- this._translateY = transform._translateY + this._translateY * transform._scale;
+ this._translateX += transform._translateX * this._scale;
+ this._translateY += transform._translateY * this._scale;
this._scale *= transform._scale;
return this;
}