From: Koichi KAMICHI Date: Thu, 31 Dec 2009 01:31:30 +0000 (+0000) Subject: re-fixed bug X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3eba99eced95089cac3edad62be21406317f74d;p=chise%2Fkage.git re-fixed bug --- diff --git a/engine/kage.js b/engine/kage.js index 7473819..743186e 100755 --- a/engine/kage.js +++ b/engine/kage.js @@ -94,9 +94,9 @@ function Kage(size){ function adjustTate(strokesArray){ // strokesArray for(var i = 0; i < strokesArray.length; i++){ - if((strokesArray[i][0] == 1 || strokesArray[i][3] || strokesArray[i][7]) && strokesArray[i][3] == strokesArray[i][5]){ + if((strokesArray[i][0] == 1 || strokesArray[i][0] == 3 || strokesArray[i][0] == 7) && strokesArray[i][3] == strokesArray[i][5]){ for(var j = 0; j < strokesArray.length; j++){ - if(i != j && (strokesArray[j][0] == 1 || strokesArray[j][3] || strokesArray[j][7]) && strokesArray[j][3] == strokesArray[j][5] && + if(i != j && (strokesArray[j][0] == 1 || strokesArray[j][0] == 3 || strokesArray[j][0] == 7) && strokesArray[j][3] == strokesArray[j][5] && !(strokesArray[i][4] + 1 > strokesArray[j][6] || strokesArray[i][6] - 1 < strokesArray[j][4]) && Math.abs(strokesArray[i][3] - strokesArray[j][3]) < this.kMinWidthT * 4){ strokesArray[i][1] += (4 - Math.floor(Math.abs(strokesArray[i][3] - strokesArray[j][3]) / this.kMinWidthT)) * 1000;