mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 21:35:04 +02:00
Fix draggable number going into edit too often
This commit is contained in:
parent
193b9752b8
commit
7694aa8e66
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ DraggableNumber.prototype = {
|
||||||
mouseUp: function(event) {
|
mouseUp: function(event) {
|
||||||
if (event.target === this.elText && this.initialMouseEvent) {
|
if (event.target === this.elText && this.initialMouseEvent) {
|
||||||
let dx = event.clientX - this.initialMouseEvent.clientX;
|
let dx = event.clientX - this.initialMouseEvent.clientX;
|
||||||
if (dx <= DELTA_X_FOCUS_THRESHOLD) {
|
if (Math.abs(dx) <= DELTA_X_FOCUS_THRESHOLD) {
|
||||||
this.elInput.style.visibility = "visible";
|
this.elInput.style.visibility = "visible";
|
||||||
this.elText.style.visibility = "hidden";
|
this.elText.style.visibility = "hidden";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue