Skip to content

Commit

Permalink
Release v3.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell committed May 25, 2016
1 parent 92f15da commit b9ad3c4
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 127 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ Download or get the CDN link to the script:

| Name | Supported barcodes | Size (gzip) | CDN / Download |
|------|--------------------|:-----------:|---------------:|
| *All* | *All the barcodes!* | *7 kB* | *[JsBarcode.all.min.js][1]* |
| CODE128 | CODE128 (auto and force mode) | 4.7 kB | [JsBarcode.code128.min.js][2] |
| CODE39 | CODE39 | 3.7 kB | [JsBarcode.code39.min.js][3] |
| EAN / UPC | EAN-13, EAN-8, EAN-5, EAN-2, UPC (A) | 4.2 kB | [JsBarcode.ean-upc.min.js][4] |
| ITF-14 | ITF-14 | 3.5 kB | [JsBarcode.itf-14.min.js][5] |
| ITF | ITF | 3.4 kB | [JsBarcode.itf.min.js][6] |
| MSI | MSI, MSI10, MSI11, MSI1010, MSI1110 | 3.9 kB | [JsBarcode.msi.min.js][7] |
| Pharmacode | Pharmacode | 3.3 kB | [JsBarcode.pharmacode.min.js][8] |
| *All* | *All the barcodes!* | *6.9 kB* | *[JsBarcode.all.min.js][1]* |
| CODE128 | CODE128 (auto and force mode) | 4.6 kB | [JsBarcode.code128.min.js][2] |
| CODE39 | CODE39 | 3.6 kB | [JsBarcode.code39.min.js][3] |
| EAN / UPC | EAN-13, EAN-8, EAN-5, EAN-2, UPC (A) | 4.1 kB | [JsBarcode.ean-upc.min.js][4] |
| ITF-14 | ITF-14 | 3.4 kB | [JsBarcode.itf-14.min.js][5] |
| ITF | ITF | 3.3 kB | [JsBarcode.itf.min.js][6] |
| MSI | MSI, MSI10, MSI11, MSI1010, MSI1110 | 3.8 kB | [JsBarcode.msi.min.js][7] |
| Pharmacode | Pharmacode | 3.2 kB | [JsBarcode.pharmacode.min.js][8] |

### Step 2:
Include the script in your code:
Expand Down
66 changes: 13 additions & 53 deletions bin/JsBarcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,70 +147,30 @@ API.prototype.init = function () {
this._renderProperties = [this._renderProperties];
}

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var renderProperty;
for (var i in this._renderProperties) {
renderProperty = this._renderProperties[i];
var options = (0, _merge2.default)(this._options, renderProperty.options);

try {
for (var _iterator = this._renderProperties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var renderProperty = _step.value;

var options = (0, _merge2.default)(this._options, renderProperty.options);

if (options.format == "auto") {
options.format = autoSelectBarcode();
}
if (options.format == "auto") {
options.format = autoSelectBarcode();
}

var text = options.value;
var text = options.value;

var Encoder = _barcodes2.default[options.format.toUpperCase()];
var Encoder = _barcodes2.default[options.format.toUpperCase()];

var encoded = encode(text, Encoder, options);
var encoded = encode(text, Encoder, options);

render(renderProperty, encoded, options);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
render(renderProperty, encoded, options);
}
};

// The render API call. Calls the real render function.
API.prototype.render = function () {
if (Array.isArray(this._renderProperties)) {
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;

try {
for (var _iterator2 = this._renderProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var renderProperty = _step2.value;

render(renderProperty, this._encodings, this._options);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
for (var i in this._renderProperties) {
render(this._renderProperties[i], this._encodings, this._options);
}
} else {
render(this._renderProperties, this._encodings, this._options);
Expand Down
2 changes: 1 addition & 1 deletion bin/renderers/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function prepareSVG(svg, options, encodings) {
svg.setAttribute("xmlns", svgns);
svg.setAttribute("version", "1.1");

svg.style.transform = "translate(0,0)";
//svg.style.transform = "translate(0,0)";

if (options.background) {
svg.style.background = options.background;
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "JsBarcode",
"main": "dist/JsBarcode.all.min.js",
"version": "3.3.6",
"version": "3.3.7",
"homepage": "https://github.com/lindell/JsBarcode",
"authors": [
"Johan Lindell <[email protected]>"
Expand Down
68 changes: 14 additions & 54 deletions dist/JsBarcode.all.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,70 +776,30 @@
this._renderProperties = [this._renderProperties];
}

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var renderProperty;
for (var i in this._renderProperties) {
renderProperty = this._renderProperties[i];
var options = (0, _merge2.default)(this._options, renderProperty.options);

try {
for (var _iterator = this._renderProperties[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var renderProperty = _step.value;

var options = (0, _merge2.default)(this._options, renderProperty.options);

if (options.format == "auto") {
options.format = autoSelectBarcode();
}
if (options.format == "auto") {
options.format = autoSelectBarcode();
}

var text = options.value;
var text = options.value;

var Encoder = _barcodes2.default[options.format.toUpperCase()];
var Encoder = _barcodes2.default[options.format.toUpperCase()];

var encoded = encode(text, Encoder, options);
var encoded = encode(text, Encoder, options);

render(renderProperty, encoded, options);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
render(renderProperty, encoded, options);
}
};

// The render API call. Calls the real render function.
API.prototype.render = function () {
if (Array.isArray(this._renderProperties)) {
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;

try {
for (var _iterator2 = this._renderProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var renderProperty = _step2.value;

render(renderProperty, this._encodings, this._options);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
for (var i in this._renderProperties) {
render(this._renderProperties[i], this._encodings, this._options);
}
} else {
render(this._renderProperties, this._encodings, this._options);
Expand Down Expand Up @@ -2650,7 +2610,7 @@
svg.setAttribute("xmlns", svgns);
svg.setAttribute("version", "1.1");

svg.style.transform = "translate(0,0)";
//svg.style.transform = "translate(0,0)";

if (options.background) {
svg.style.background = options.background;
Expand Down
4 changes: 2 additions & 2 deletions dist/JsBarcode.all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.code128.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.code39.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.ean-upc.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.itf-14.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/barcodes/JsBarcode.itf.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit b9ad3c4

Please sign in to comment.