diff --git a/web/app/canvas.js b/web/app/canvas.js index 2ed37fd3..f548f041 100644 --- a/web/app/canvas.js +++ b/web/app/canvas.js @@ -55,9 +55,9 @@ TCAD.TWO.utils.setStyle = function(style, ctx, scale) { TCAD.TWO.Viewer = function(canvas) { this.canvas = canvas; - - this.canvas.width = window.innerWidth; - this.canvas.height = window.innerHeight; + + this.canvas.width = canvas.parentNode.offsetWidth; + this.canvas.height = canvas.parentNode.offsetHeight; this.ctx = this.canvas.getContext("2d"); this.layers = []; diff --git a/web/sandbox.html b/web/sandbox.html index bc2e0d74..1905cb6f 100644 --- a/web/sandbox.html +++ b/web/sandbox.html @@ -1,23 +1,70 @@ - Sandbox - + TCAD + - - - - - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/web/test.html b/web/test.html index 8f963ada..0af2b453 100644 --- a/web/test.html +++ b/web/test.html @@ -1,42 +1,31 @@ + - TCAD - - - - - - - - - - - - - + - - - - - - + +
+
+ +
+ +
+
+
+
\ No newline at end of file