-
Notifications
You must be signed in to change notification settings - Fork 73
Description
In order to get the example/article to display correctly (none of the five "canvas" samples show up), I needed to make a couple of corrections in the align() function of index.html:
- In recently added line
devicePixelRatio = window.devicePixelRatio || 1;the semicolon must be changed to a comma:devicePixelRatio = window.devicePixelRatio || 1,or else bad things happen. This is clearly a coding error, as the next lineformat, nodes, breaks;is clearly meant to be the end of the var statement. - A few lines later, I had to comment out the entire line
canvas.scale(devicePixelRatio, devicePixelRatio);. If I don't, there's no sign that it ever gets past this statement (window.alert("I just did the scale");doesn't show up).devicePixelRatiohas a value of "1", so it shouldn't be making any difference. I'm not sure what's going wrong here, but since the scale factor is 1 anyway, no harm done.
This was tried on the current Firefox browser. It works great with the two changes (all five canvas samples now show up). Does it display OK (without change) on other browsers? Incidentally, the same "article" works OK on the frobnitzem/typeset fork.
Add: Is there anything I can do or set in Javascript to flag the errors I reported above? It just silently glided past these errors without saying a word (just not working as expected). I find that most unsatisfactory. Flagging undeclared variables, flagging syntax errors, and reporting runtime errors is the bare minimum for any decent language!