Skip to content

Commit

Permalink
Changed QR to png instead of svg.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sem committed May 8, 2014
1 parent 8da6957 commit d2666b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion html/modals/show-qr.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="text-center showqr">
<qr data="{{vars.address}}" level="L" width="80%" height="80%"></qr>
<qr data="{{vars.address}}" level="L"></qr>
<div class="qr-address">{{vars.address}}</div>
</div>
<div class="qractions">
Expand Down
11 changes: 6 additions & 5 deletions js/frontend/directives/qr.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
'use strict';

define(['./module', 'qrcodejs'], function (directives, QRCode) {
directives.directive('qr', function() {
directives.directive('qr', ['$window', function($window) {
return {
restrict: 'E',
link: function(scope, element, attrs) {
var qrcode = new QRCode(element[0], {
width : attrs.width,
height : attrs.height,
width : 1000,
height : 1000,
correctLevel : QRCode.CorrectLevel.H,
useSVG: true
});
qrcode.makeCode(attrs.data);
if (attrs.width) element[0].lastChild.setAttribute('width', attrs.width);
if (attrs.height) element[0].lastChild.setAttribute('height', attrs.height);
}
};
});
}]);
});

0 comments on commit d2666b6

Please sign in to comment.