bunkat/wordfind

Orientations not working

luizhop opened this issue · 0 comments

Hi,

The orientations parameter is not working for me.
I have tried to set only horizontal and both horizontal and vertical, but in both cases the words are spread using other options (horizontalBack, verticalUp, diagonal, etc).

Thanks,


UPDATE [Problem solved]

I was declaring two different things (the wordfind and the puzzle) and setting the properties at the wrong place:
var gamePuzzle = wordfindgame.create(words, '#puzzle', '#words');
var puzzle = wordfind.newPuzzle(words, { orientations: ['horizontal', 'vertical'] });

So I took a look inside the .js files and found out that only declaring wordfindgame.create will do all the job, so it worked when I changed to:
var puzzleOptions = { orientations: ['horizontal', 'vertical'] };
var gamePuzzle = wordfindgame.create(words, '#puzzle', '#words', puzzleOptions);