Quellcode durchsuchen

Reverted last change to Input. Didn't work.

dev
Bryan Miller vor 5 Jahren
Ursprung
Commit
3df24cc4de
1 geänderte Dateien mit 5 neuen und 7 gelöschten Zeilen
  1. +5
    -7
      app/js/ui/Input.js

+ 5
- 7
app/js/ui/Input.js Datei anzeigen

@@ -451,13 +451,11 @@ export default class Input{
inbounds: true
}
if (this.__mouseTarget !== null){
if (this.__mouseTarget === document.activeElement){
var rect = this.__mouseTarget.getBoundingClientRect();
pos.x -= rect.left;
pos.y -= rect.top;
pos.inbounds = (pos.x >= 0 && pos.x < rect.width && pos.y >= 0 && pos.y < rect.height);
}
pos.inbounds = false;
var rect = this.__mouseTarget.getBoundingClientRect();
pos.x -= rect.left;
pos.y -= rect.top;
// TODO: Detect if element OVER __mouseTarget
pos.inbounds = (pos.x >= 0 && pos.x < rect.width && pos.y >= 0 && pos.y < rect.height);
}
pos.x = Math.floor(pos.x);
pos.y = Math.floor(pos.y);

Laden…
Abbrechen
Speichern