mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Change draggable hover color to be more in tune with the default styling
This commit is contained in:
@ -45,9 +45,9 @@ DraggableListModule.prototype.init = function () {
|
|||||||
const overLocation = event.clientY - rect.top;
|
const overLocation = event.clientY - rect.top;
|
||||||
const halfHeight = rect.height / 2;
|
const halfHeight = rect.height / 2;
|
||||||
if (overLocation < halfHeight) {
|
if (overLocation < halfHeight) {
|
||||||
draggable.style.background = "linear-gradient(to top, transparent, transparent 60%, rgb(20,20,20) 75%, rgb(40,40,40) 85%, var(--white50a))";
|
draggable.style.background = "linear-gradient(to top, transparent, transparent 75%, rgb(225, 138, 36))";
|
||||||
} else {
|
} else {
|
||||||
draggable.style.background = "linear-gradient(to bottom, transparent, transparent 60%, rgb(20,20,20) 75%, rgb(40,40,40) 85%, var(--white50a))";
|
draggable.style.background = "linear-gradient(to bottom, transparent, transparent 75%, rgb(225, 138, 36))";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
@ -56,6 +56,7 @@ DraggableListModule.prototype.init = function () {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const draggable = this.getClosestDraggable(event.target) || this.getClosestDroppable(event.target);
|
const draggable = this.getClosestDraggable(event.target) || this.getClosestDroppable(event.target);
|
||||||
if (draggable) draggable.style.background = "";
|
if (draggable) draggable.style.background = "";
|
||||||
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
this.list.addEventListener("drop", (event) => {
|
this.list.addEventListener("drop", (event) => {
|
||||||
@ -100,7 +101,6 @@ DraggableListModule.prototype.insertBefore = function (target, origin) {
|
|||||||
|
|
||||||
DraggableListModule.prototype.insertAfter = function (target, origin) {
|
DraggableListModule.prototype.insertAfter = function (target, origin) {
|
||||||
if (!target || !origin) return;
|
if (!target || !origin) return;
|
||||||
console.log("after")
|
|
||||||
target.style.background = "";
|
target.style.background = "";
|
||||||
origin.style.opacity = "";
|
origin.style.opacity = "";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user