OSDN Git Service

for CLEM
authorYamamotoTakayuki <fall.spling@gmail.com>
Wed, 7 Mar 2018 08:43:46 +0000 (17:43 +0900)
committerYamamotoTakayuki <fall.spling@gmail.com>
Wed, 7 Mar 2018 08:43:46 +0000 (17:43 +0900)
JS/CLEM.js

index bdcb373..972205c 100644 (file)
@@ -84,9 +84,9 @@ $(function() {
       alert(rad * 180 / Math.PI + " 度");
 
       ctx.clearRect(0, 0, 512, 512);
-      ctx.translate(216, 216);
+      ctx.translate(256, 256);
       ctx.rotate(-1 * rad);
-      ctx.translate(-216, -216);
+      ctx.translate(-256, -256);
       $('#CLEMimg').change();
       /*for(i=0;i<rowlen;i++){
         var temp={x:0,y:0};
@@ -119,8 +119,8 @@ function calcClemCoord(event) { //CLEM画像のポインター位置の座標を
   // 要素内におけるクリック位置を計算
   // 要素の中心を0にする
   var cod = new Object();
-  cod.x = clickX - positionX - 256;
-  cod.y = clickY - positionY - 256;
+  cod.x = clickX - positionX - 255;
+  cod.y = clickY - positionY - 255;
   return cod;
 }
 /*