Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with IE7 #7

Open
Coolspot83 opened this issue Oct 25, 2013 · 0 comments
Open

Problems with IE7 #7

Coolspot83 opened this issue Oct 25, 2013 · 0 comments

Comments

@Coolspot83
Copy link

I know, tiles.js was written for newer Browsers... unfortunately, there a still IE7 user out there...

When using tiles.js with IE7, the tiles in the grid collapse to tiny tiles without any layout.

I searched through the code of Template.js and found this code block:

// parse the cells in a single row
for (x = 0, rowLength = row.length; x < rowLength; x++) {
       cell = row[x];  // LINE OF INTERERST!
    if (cell !== ' ') {
       cells[y].push(cell);
   }
}

The problem with IE7 is, that it doesn't know what do with square brackets in order to get a character from a string.

I simply changed the line to:

// parse the cells in a single row
for (x = 0, rowLength = row.length; x < rowLength; x++) {
       cell = row.charAt(x);  // LINE OF INTERERST! - changed.
    if (cell !== ' ') {
       cells[y].push(cell);
   }
}

... and I could bring the joy of tiles.js also to IE7 user! :-)

PS: TILES.JS IS AWESOME! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant