You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize this is an old thread, but wanted to add a note for anyone else who may be looking for a solution to the padding issue.
It appears to me that the getModuleSize function already accounts for the padding value. As such, there is no need to add a condition in the getOffset function to handle padding.
I made the following edit with positive results:
getOffset: function(frame) {
var qrious = this.qrious;
/* var padding = qrious.padding;
*
* if (padding != null) {
* return padding;
* }
*/
var moduleSize = this.getModuleSize(frame);
var offset = Math.floor((qrious.size - (moduleSize * frame.width)) / 2);
return Math.max(0, offset);
},
qr.background = '#cfcfcf';
qr.backgroundAlpha = 1.0;
qr.foregroundAlpha = 1.0;
qr.foreground = '#000000';
qr.level = 'L';
qr.padding = 10;
qr.size = 220;
qr.value = '#123';
The text was updated successfully, but these errors were encountered: