@lightningjs/ui
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@lightningjs/ui", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Standard UI components for Lightning", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -31,3 +31,3 @@ /* | ||
let currentKey = this.children && this.children[0]; | ||
if(currentKey && currentKey.action === this._key.action) { | ||
if(currentKey && currentKey.action === this._key.data.action) { | ||
currentKey.patch({ | ||
@@ -34,0 +34,0 @@ ...this._key |
@@ -212,3 +212,3 @@ /* | ||
_changeInput(input) { | ||
if(this._input.length === this._maxCharacters) { | ||
if(input >= this._maxCharacters) { | ||
return; | ||
@@ -290,6 +290,7 @@ } | ||
const currentColumnIndex = this._columnIndex; | ||
if(this._previousKey && this._previousKey.row === targetIndex) { | ||
const tmp = this._previousKey.column; | ||
this._previousKey.column = this._columnIndex; | ||
if(this._previous && this._previous.row === targetIndex) { | ||
const tmp = this._previous.column; | ||
this._previous.column = this._columnIndex; | ||
this._columnIndex = tmp; | ||
this._rowIndex = this._previous.row; | ||
} | ||
@@ -303,6 +304,6 @@ else { | ||
if(keyX <= currentX && currentX < keyX + key.w) { | ||
return keyX + key.x - currentX; | ||
return (keyX + key.w) - currentX; | ||
} | ||
if(keyX >= currentX && keyX <= currentX + currentKey.w) { | ||
return currentX + currentKey.w - keyX; | ||
return (currentX + currentKey.w) - keyX; | ||
} | ||
@@ -313,2 +314,3 @@ return -1; | ||
let t = -1; | ||
for(let i = 0; i < m.length; i++) { | ||
@@ -315,0 +317,0 @@ if(m[i] === -1 && acc > -1) { |
127503
1883