Skip to content

Commit 3e8a59f

Browse files
committed
Merge pull request #44 from ysangkok/patch-1
Swap col and row in SVG output so that the display equals the PNG output
2 parents 3c1663d + 11d1bdb commit 3e8a59f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qrcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ var QRCode;
205205
for (var row = 0; row < nCount; row++) {
206206
for (var col = 0; col < nCount; col++) {
207207
if (oQRCode.isDark(row, col)) {
208-
var child = makeSVG("use", {"x": String(row), "y": String(col)});
208+
var child = makeSVG("use", {"x": String(col), "y": String(row)});
209209
child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template")
210210
svg.appendChild(child);
211211
}

0 commit comments

Comments
 (0)