dt-virtual-keyboard
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -177,2 +177,3 @@ (function (global, factory) { | ||
this.destroyed = false; | ||
this.touchActive = false; | ||
this.block2 = this.block2Letters; | ||
@@ -202,3 +203,7 @@ this.block3 = this.block3LettersItalian; | ||
if (isTouch === void 0) { isTouch = false; } | ||
if (isTouch !== this.isTouchDevice() || (event.touches && event.touches.length > 1)) { | ||
if (isTouch) { | ||
this.touchActive = true; | ||
} | ||
if ((!isTouch && this.touchActive) || (event.touches && event.touches.length > 1)) { | ||
this.touchActive = false; | ||
return; | ||
@@ -227,3 +232,7 @@ } | ||
var _a; | ||
if (isTouch !== this.isTouchDevice() || (event.touches && event.touches.length > 1)) { | ||
if (isTouch) { | ||
this.touchActive = true; | ||
} | ||
if ((!isTouch && this.touchActive) || (event.touches && event.touches.length > 1)) { | ||
this.touchActive = false; | ||
return; | ||
@@ -465,7 +474,2 @@ } | ||
}; | ||
DtVirtualKeyboardComponent.prototype.isTouchDevice = function () { | ||
return (('ontouchstart' in window) || | ||
(navigator.maxTouchPoints > 0) || | ||
(navigator.msMaxTouchPoints > 0)); | ||
}; | ||
return DtVirtualKeyboardComponent; | ||
@@ -472,0 +476,0 @@ }()); |
@@ -153,2 +153,3 @@ import * as i0 from '@angular/core'; | ||
this.destroyed = false; | ||
this.touchActive = false; | ||
this.block2 = this.block2Letters; | ||
@@ -176,3 +177,7 @@ this.block3 = this.block3LettersItalian; | ||
_onMouseDown(event, key, isTouch = false) { | ||
if (isTouch !== this.isTouchDevice() || (event.touches && event.touches.length > 1)) { | ||
if (isTouch) { | ||
this.touchActive = true; | ||
} | ||
if ((!isTouch && this.touchActive) || (event.touches && event.touches.length > 1)) { | ||
this.touchActive = false; | ||
return; | ||
@@ -200,3 +205,7 @@ } | ||
var _a; | ||
if (isTouch !== this.isTouchDevice() || (event.touches && event.touches.length > 1)) { | ||
if (isTouch) { | ||
this.touchActive = true; | ||
} | ||
if ((!isTouch && this.touchActive) || (event.touches && event.touches.length > 1)) { | ||
this.touchActive = false; | ||
return; | ||
@@ -425,7 +434,2 @@ } | ||
} | ||
isTouchDevice() { | ||
return (('ontouchstart' in window) || | ||
(navigator.maxTouchPoints > 0) || | ||
(navigator.msMaxTouchPoints > 0)); | ||
} | ||
} | ||
@@ -432,0 +436,0 @@ DtVirtualKeyboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.1", ngImport: i0, type: DtVirtualKeyboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); |
@@ -80,2 +80,3 @@ import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; | ||
private destroyed; | ||
private touchActive; | ||
protected onClickFunction: any; | ||
@@ -127,5 +128,4 @@ constructor(); | ||
}): void; | ||
isTouchDevice(): boolean; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<DtVirtualKeyboardComponent, never>; | ||
static ɵcmp: i0.ɵɵComponentDeclaration<DtVirtualKeyboardComponent, "lib-dt-virtual-keyboard", never, { "config": "config"; }, { "type": "type"; "languageChanged": "languageChanged"; "enter": "enter"; "cancel": "cancel"; "tab": "tab"; }, never, never>; | ||
} |
{ | ||
"name": "dt-virtual-keyboard", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^12.1.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
304915
1826