+16
-3
@@ -59,5 +59,3 @@ 'use strict'; | ||
| colors: TELETEXT_COLORS, | ||
| characterSets: [_characters2.default['alphanumeric'], _characters2.default['mosaic'], _characters2.default['separated']], | ||
| rows: options.teletext.length, | ||
| cols: options.teletext[0].length | ||
| characterSets: [_characters2.default['alphanumeric'], _characters2.default['mosaic'], _characters2.default['separated']] | ||
| })); | ||
@@ -73,2 +71,4 @@ | ||
| this.teletext = text; | ||
| this.rows = this.teletext.length; | ||
| this.cols = this.getLongestRowLength(); | ||
| this._parseTeletext(); | ||
@@ -96,2 +96,15 @@ } | ||
| }, { | ||
| key: 'getLongestRowLength', | ||
| value: function getLongestRowLength() { | ||
| var longestLength = 0; | ||
| this.teletext.forEach(function (row) { | ||
| if (row.length > longestLength) { | ||
| longestLength = row.length; | ||
| } | ||
| }); | ||
| return longestLength; | ||
| } | ||
| }, { | ||
| key: '_parseTeletext', | ||
@@ -98,0 +111,0 @@ value: function _parseTeletext() { |
+1
-1
| { | ||
| "name": "teletext", | ||
| "version": "0.0.14", | ||
| "version": "0.0.15", | ||
| "description": "JavaScript Teletext generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/js/teletext.js", |
23869
1.14%311
3.67%