]> git.eli173.com Git - textrivers/commitdiff
whoops
authorElijah Cohen <eli@eli173.com>
Mon, 30 Oct 2017 04:04:30 +0000 (00:04 -0400)
committerElijah Cohen <eli@eli173.com>
Mon, 30 Oct 2017 04:04:30 +0000 (00:04 -0400)
tr.js

diff --git a/tr.js b/tr.js
index a35f07fcee264ff7d30d72ec93c84b9244a50386..a9abfdfe2bb1e022feabee8d933085000923fd0a 100644 (file)
--- a/tr.js
+++ b/tr.js
@@ -114,7 +114,7 @@ function go() {
     console.log(w);
     console.log(t);
     p = mat_to_png(get_matrix(s,w,t));
-    document.getElementById("img_zone").innerHTML = '<img src="data:image/png;base64,'+p.getBase64()+'" style="transform: scale('+scl+'); margin-top: '+20+'px;">';
+    document.getElementById("img_zone").innerHTML = '<img src="data:image/png;base64,'+p.getBase64()+'" style="transform: scale('+scl+'); margin-top: '+scl*p.height/2+'px;">';
     //d = document.createElement('div');
     //d.innerHTML = 
     //document.getElementById("img_zone").appendChild(d);