feat: Remove cases that cannot happen

Optimize HippieTaskBar by removing cases that cannot happen.
This commit is contained in:
sthag 2026-02-09 19:09:02 +01:00
parent fe8008c5b5
commit 9696442a91

View file

@ -49,8 +49,6 @@ class HippieTaskBar {
onMouseMove(event) { onMouseMove(event) {
if (this.isDragging) { if (this.isDragging) {
if (!this.isDragging) return;
const closestEdge = getClosestEdge(this.placeholder); const closestEdge = getClosestEdge(this.placeholder);
const borderRadius = '4px'; const borderRadius = '4px';
const attributes = { const attributes = {
@ -121,7 +119,6 @@ class HippieTaskBar {
if (event.target === this.placeholder) { if (event.target === this.placeholder) {
console.debug('Drag mode disabled'); console.debug('Drag mode disabled');
if (!this.isDragging) return;
this.isDragging = false; this.isDragging = false;
this.snapToEdges(); this.snapToEdges();