Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/neocotic/qrious
Browse files Browse the repository at this point in the history
  • Loading branch information
neocotic committed Aug 5, 2016
2 parents 10d5e02 + 26bc7f5 commit 1ffd092
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 35 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 2.0.2, 2016.08.05

* Fix bug where mask is incorrectly applied [#50](https://github.com/neocotic/qrious/issues/50)

## Version 2.0.1, 2016.07.03

* Correct license mentioned into `README.md`
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ The current version of `QRious`.

``` javascript
console.log(QRious.VERSION)
//=> "2.0.0"
//=> "2.0.2"
```

## Migrating from v1
Expand Down Expand Up @@ -213,6 +213,7 @@ A list of QRious contributors can be found in [AUTHORS.md](https://github.com/ne

## License

Copyright (c) 2016 Alasdair Mercer
Copyright © 2016 Alasdair Mercer
Copyright © 2010 Tom Zerucha

See [LICENSE.md](https://github.com/neocotic/qrious/blob/master/LICENSE.md) for more information on our GPLv3 license.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qrious",
"version": "2.0.1",
"version": "2.0.2",
"description": "Library for QR code generation using canvas",
"homepage": "https://github.com/neocotic/qrious",
"authors": [
Expand Down
16 changes: 7 additions & 9 deletions dist/cjs/qrious.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/qrious.js.map

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions dist/umd/qrious.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/umd/qrious.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/umd/qrious.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/qrious.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qrious",
"version": "2.0.1",
"version": "2.0.2",
"description": "Library for QR code generation using canvas",
"homepage": "https://github.com/neocotic/qrious",
"bugs": {
Expand Down
12 changes: 5 additions & 7 deletions src/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Frame {
this._value = options.value
this._valueLength = this._value.length
this._version = 0
this._stringBuffer = this._value.slice(0)
this._stringBuffer = []

let dataBlock
let eccBlock
Expand Down Expand Up @@ -152,7 +152,7 @@ class Frame {
this._insertTimingRowAndColumn()
this._insertVersion()
this._syncMask()
this._convertBitStream(this._stringBuffer.length)
this._convertBitStream(this._value.length)
this._calculatePolynomial()
this._appendEccToData()
this._interleaveBlocks()
Expand Down Expand Up @@ -319,7 +319,7 @@ class Frame {
r3x = 0
}

if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {
if (!((x & y & 1) + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {
this.buffer[x + y * width] ^= 1
}
}
Expand Down Expand Up @@ -457,11 +457,9 @@ class Frame {
}

_convertBitStream(length) {
// Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji
// not supported).

// Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji not supported).
for (let i = 0; i < length; i++) {
this._ecc[i] = this._stringBuffer.charCodeAt(i)
this._ecc[i] = this._value.charCodeAt(i)
}

this._stringBuffer = this._ecc.slice(0)
Expand Down
2 changes: 1 addition & 1 deletion src/QRious.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class QRious {
* @static
*/
static get VERSION() {
return '2.0.1'
return '2.0.2'
}

/**
Expand Down

0 comments on commit 1ffd092

Please sign in to comment.