@@ -990,8 +990,10 @@ function storeOnlyArrows(rowNum, y1, link, xPositions) {
990990 var xpos = xPositions [ i ] . xpos ;
991991 var ypos ;
992992
993+
993994 var w = link . words [ wordIdx ] ;
994-
995+ console . log ( "\n\n *** \n\n in storeOnlyArrows \n word: " + link . words [ wordIdx ] ) ;
996+ console . log ( "\nxPos: " + xPositions [ i ] . xpos ) ;
995997
996998 if ( w instanceof Word ) { // && w.row.idx == rowNum) {
997999 ypos = w . bbox . y ;
@@ -1005,12 +1007,13 @@ function storeOnlyArrows(rowNum, y1, link, xPositions) {
10051007 }
10061008
10071009 arrowPos . push ( { x :xpos , y :ypos } ) ;
1008-
1010+ console . log ( "arrowPosPush: " + arrowPos ) ;
10091011 //link.leftAttach == sides.RIGHT;
10101012 //link.rightAttach == sides.RIGHT;
1011- storeArrow ( wordIdx , xpos , ypos , link , w , link . leftAttach , getLeftXForWord ( w , link ) , getRightXForWord ( w , link ) ) ;
1013+ storeArrow ( wordIdx , xpos , ypos , link , w , link . rightAttach , getLeftXForWord ( w , link ) , getRightXForWord ( w , link ) ) ;
10121014 }
10131015
1016+ console . log ( "arrowPos: " + arrowPos ) ;
10141017 return arrowPos ;
10151018}
10161019
@@ -1210,7 +1213,6 @@ function calculateEndRow(idx, rowNum, link, percentagePadding, xPositions, linkS
12101213 var yPos = rows [ rowNum ] . baseHeight - link . h * percentagePadding ;
12111214
12121215 var arrowPos = storeOnlyArrows ( rowNum , yPos , link , xPositions ) ;
1213-
12141216 arrowPos . sort ( function ( a , b ) {
12151217 return a . x - b . x ;
12161218 } ) ;
@@ -1456,6 +1458,7 @@ function filterXPositionsForOnlyThisRow(attachmentXPositions, row, link, which)
14561458
14571459
14581460function storeArrow ( idx , x , y , link , word , side , leftX , rightX ) {
1461+ console . log ( "\n *** in storedArrow \n x: " + x + " y: " + y + " word: " + word ) ;
14591462 link . arrows [ idx ] = { x :x , y :y , link :link , word :word , side :side , leftX :leftX , rightX : rightX , visibility :true } ;
14601463}
14611464
0 commit comments