tentone 6 年之前
父节点
当前提交
db966e13e5
共有 3 个文件被更改,包括 2 次插入24 次删除
  1. 0 8
      build/escher.js
  2. 0 8
      build/escher.module.js
  3. 2 8
      source/Viewport.js

+ 0 - 8
build/escher.js

@@ -1670,14 +1670,6 @@
 				this.matrix.scale(this.scale, this.scale);
 			}
 
-			/*var ox = (this.canvas.width / 2.0);
-			var oy = (this.canvas.height / 2.0);
-
-			if(ox !== 0 || oy !== 0)
-			{	
-				this.matrix.multiply(new Matrix([1, 0, 0, 1, -ox, -oy]));
-			}*/
-
 			this.inverseMatrix = this.matrix.getInverse();
 			this.matrixNeedsUpdate = false;
 		}

+ 0 - 8
build/escher.module.js

@@ -1664,14 +1664,6 @@ Viewport.prototype.updateMatrix = function()
 			this.matrix.scale(this.scale, this.scale);
 		}
 
-		/*var ox = (this.canvas.width / 2.0);
-		var oy = (this.canvas.height / 2.0);
-
-		if(ox !== 0 || oy !== 0)
-		{	
-			this.matrix.multiply(new Matrix([1, 0, 0, 1, -ox, -oy]));
-		}*/
-
 		this.inverseMatrix = this.matrix.getInverse();
 		this.matrixNeedsUpdate = false;
 	}

+ 2 - 8
source/Viewport.js

@@ -86,19 +86,13 @@ Viewport.prototype.updateMatrix = function()
 			this.matrix.multiply(new Matrix([c, s, -s, c, 0, 0]));
 		}
 
+		//this.matrix.multiply(new Matrix([c, s, -s, c, 0, 0]));
+
 		if(this.scale !== 1)
 		{
 			this.matrix.scale(this.scale, this.scale);
 		}
 
-		/*var ox = (this.canvas.width / 2.0);
-		var oy = (this.canvas.height / 2.0);
-
-		if(ox !== 0 || oy !== 0)
-		{	
-			this.matrix.multiply(new Matrix([1, 0, 0, 1, -ox, -oy]));
-		}*/
-
 		this.inverseMatrix = this.matrix.getInverse();
 		this.matrixNeedsUpdate = false;
 	}