@@ -101,7 +101,7 @@ class Row {
101101 }
102102
103103 draw ( ) {
104- console . log ( " in Row " + this . idx + " about to call drawRow" ) ;
104+ // console.log(" in Row " + this.idx + " about to call drawRow");
105105 drawRow ( this ) ;
106106 }
107107
@@ -170,7 +170,7 @@ class Word {
170170 //take temp values and update actual svg values
171171 update ( ) {
172172
173- // console.log("\n***\nin update X = " + this.tempX + ", Y = " + this.tempY + ", W = " + this.tempW );
173+ //// console.log("\n***\nin update X = " + this.tempX + ", Y = " + this.tempY + ", W = " + this.tempW );
174174 this . aboveRect . x ( this . tempX ) ;
175175 this . aboveRect . width ( this . tempW ) ;
176176
@@ -196,7 +196,7 @@ class Word {
196196
197197
198198 draw ( ) {
199- //console.log(" in Word " + this.val + " about to call drawWord");
199+ //// console.log(" in Word " + this.val + " about to call drawWord");
200200 drawWord ( this ) ;
201201 }
202202
@@ -215,7 +215,7 @@ class Word {
215215 }
216216
217217 static testMe ( val ) {
218- console . log ( " in Word, static testMe, val = " + val ) ;
218+ // console.log(" in Word, static testMe, val = " + val);
219219 return '' + val + '' + val ;
220220
221221 }
@@ -228,9 +228,9 @@ function checkSlotAvailabity(num, slotArr) {
228228
229229 if ( debug ) {
230230 if ( slotArr . indexOf ( num ) < 0 ) {
231- //console.log("slot " + num + " not found..." );
231+ //// console.log("slot " + num + " not found..." );
232232 } else {
233- //console.log("slot " + num + " found! index = " + slotArr.indexOf(num));
233+ //// console.log("slot " + num + " found! index = " + slotArr.indexOf(num));
234234 }
235235 }
236236
@@ -268,7 +268,7 @@ function checkAndUpdateWordToWordSlots(link, startSlot) { //, minWord, minSide,
268268 break ;
269269 }
270270 }
271- //console.log("looking for slot " + x + " in right side of " + wordObjs[i].val);
271+ //// console.log("looking for slot " + x + " in right side of " + wordObjs[i].val);
272272
273273 if ( checkSlotAvailabity ( x , wordObjs [ i ] . slotsR ) ) {
274274 slotIsAvailable = false ;
@@ -341,7 +341,7 @@ function checkAndUpdateWordToWordSlots(link, startSlot) { //, minWord, minSide,
341341 }
342342
343343 } else {
344- //console.log("error: couldn't find any slot available out of 100 slots!");
344+ //// console.log("error: couldn't find any slot available out of 100 slots!");
345345 }
346346
347347 debugSlots ( ) ;
@@ -355,14 +355,14 @@ function traceBackToWordObj(link, type, word, attach) {
355355 var retVal = { w : - 1 , s : - 1 } ;
356356
357357 if ( type == types . WORD ) {
358- // console.log("in traceback, node is a word, wordObj.val = " + word.val + ", attachSide = " + attach);
358+ //// console.log("in traceback, node is a word, wordObj.val = " + word.val + ", attachSide = " + attach);
359359
360360 retVal . w = word ;
361361 retVal . s = attach ;
362362 return retVal ;
363363
364364 } else {
365- // console.log("in traceback, node is a link, wordObj.val, attachSide = " + attach);
365+ //// console.log("in traceback, node is a link, wordObj.val, attachSide = " + attach);
366366
367367 var nextLink = word ;
368368 var nextType , nextWord , nextAttach ;
@@ -381,7 +381,7 @@ function traceBackToWordObj(link, type, word, attach) {
381381
382382 }
383383
384- // console.log("now going to traceback... link: " + nextLink + ", nextType: " + nextType + " nextWord " + nextWord.val + ", nextAttach: " + nextAttach);
384+ //// console.log("now going to traceback... link: " + nextLink + ", nextType: " + nextType + " nextWord " + nextWord.val + ", nextAttach: " + nextAttach);
385385
386386 return traceBackToWordObj ( nextLink , nextType , nextWord , nextAttach ) ;
387387 }
@@ -395,35 +395,35 @@ function calcAttachPoints(link, strategy) {
395395
396396 if ( link . ts == types . WORD ) {
397397 rootS = link . leftWord . idx ;
398- console . log ( "rootS = " + link . leftWord . id ) ;
398+ // console.log("rootS = " + link.leftWord.id);
399399
400400 } else {
401401 rootS = link . leftWord . rootMinWord . idx ;
402- console . log ( "rootS = " + link . leftWord . rootMinWord . id ) ;
402+ // console.log("rootS = " + link.leftWord.rootMinWord.id);
403403
404404 }
405405
406406 if ( link . te == types . WORD ) {
407407 rootE = link . rightWord . idx ;
408- console . log ( "rootE = " + link . rightWord . id ) ;
408+ // console.log("rootE = " + link.rightWord.id);
409409
410410 } else {
411411 rootE = link . rightWord . rootMaxWord . idx ;
412- console . log ( "rootE = " + link . rightWord . rootMaxWord . id ) ;
412+ // console.log("rootE = " + link.rightWord.rootMaxWord.id);
413413 }
414414
415415 if ( strategy == strategies . CLOSEST ) {
416416
417- console . log ( "" + link . id + " strategy = CLOSEST" ) ;
417+ // console.log("" + link.id + " strategy = CLOSEST");
418418
419419 if ( rootS < rootE ) {
420- console . log ( "rootS < rootE (" + rootS + " < " + rootE + ")" ) ;
420+ // console.log("rootS < rootE (" +rootS +" < " + rootE +")");
421421 link . leftWord . nr += 1 ;
422422 link . rightWord . nl += 1 ;
423423 link . leftAttach = sides . RIGHT ;
424424 link . rightAttach = sides . LEFT ;
425425 } else {
426- console . log ( "rootS >= rootE (" + rootS + " >= " + rootE + ")" ) ;
426+ // console.log("rootS >= rootE (" +rootS +" >= " + rootE +")");
427427
428428 link . leftWord . nl += 1 ;
429429 link . rightWord . nr += 1 ;
@@ -435,7 +435,7 @@ function calcAttachPoints(link, strategy) {
435435
436436 }
437437 } else if ( strategy == strategies . FARTHEST ) {
438- console . log ( "" + link . id + " strategy = FARTHEST" ) ;
438+ // console.log("" + link.id + " strategy = FARTHEST");
439439
440440
441441 if ( rootS < rootE ) {
@@ -503,7 +503,7 @@ function flipIfNecessary(link) {
503503 )
504504 {
505505
506- console . log ( "YES, " + link . id + " needs to flip!" ) ;
506+ // console.log("YES, " + link.id + " needs to flip!");
507507
508508 flip ( link ) ;
509509
@@ -548,39 +548,39 @@ function createLink(link) {
548548
549549 flipIfNecessary ( link ) ;
550550
551- //console.log("printing link... " + link.id);
552- //console.log(link);
551+ //// console.log("printing link... " + link.id);
552+ //// console.log(link);
553553
554554 //what slot is open? (ie figure out y position)
555555 link . h = checkAndUpdateWordToWordSlots ( link , checkSlotAt ) ;
556556
557557
558558 //testing attaching the PARENT link to each child..
559559
560- //console.log("attaching the PARENT link to each child");
561- //console.log("leftWord = " + link.leftWord.id);
562- //console.log("rightWord = " + link.rightWord.id);
560+ //// console.log("attaching the PARENT link to each child");
561+ //// console.log("leftWord = " + link.leftWord.id);
562+ //// console.log("rightWord = " + link.rightWord.id);
563563
564564 //explicitly link parents of link (i.e., links that attach to this link)
565565 //if (link.leftAttach == 0) {
566566 if ( link . leftAttach == sides . LEFT ) {
567- //console.log(link.leftWord);
568- //console.log(link.leftWord.parentsL);
567+ //// console.log(link.leftWord);
568+ //// console.log(link.leftWord.parentsL);
569569 link . leftWord . parentsL . push ( link ) ;
570570 } else if ( link . leftAttach == sides . RIGHT ) {
571- //console.log(link.leftWord);
572- //console.log(link.leftWord.parentsR);
571+ //// console.log(link.leftWord);
572+ //// console.log(link.leftWord.parentsR);
573573 link . leftWord . parentsR . push ( link ) ;
574574 }
575575
576576 //if (link.rightAttach == 0) {
577577 if ( link . rightAttach == sides . LEFT ) {
578- //console.log(link.rightWord);
579- //console.log(link.rightWord.parentsL);
578+ //// console.log(link.rightWord);
579+ //// console.log(link.rightWord.parentsL);
580580 link . rightWord . parentsL . push ( link ) ;
581581 } else if ( link . rightAttach == sides . RIGHT ) {
582- //console.log(link.rightWord);
583- //console.log(link.rightWord.parentsR);
582+ //// console.log(link.rightWord);
583+ //// console.log(link.rightWord.parentsR);
584584 link . rightWord . parentsR . push ( link ) ;
585585 }
586586}
0 commit comments