Refactor dot removal logic in ZenGradientGenerator

This commit is contained in:
mr. M 2024-10-26 14:18:56 +02:00
parent aa13489798
commit 2572fb55f6
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -280,12 +280,12 @@
onDotMouseUp(event) {
if (event.button === 2) {
if (this.numberOfDots < 2 || !event.target.classList.contains('zen-theme-picker-dot')
|| this.numberOfDots === 1) {
if (this.numberOfDots < 2 || !event.target.classList.contains('zen-theme-picker-dot')) {
return;
}
event.target.remove();
this.updateCurrentWorkspace();
this.numberOfDots--;
return;
}
if (this.dragging) {