修复拖拽复选框对桌面无效的问题

This commit is contained in:
枫谷剑仙 2025-06-24 00:18:00 +08:00
parent 9d3e144e77
commit 07a4b3f8cf
2 changed files with 8 additions and 6 deletions

View File

@ -3865,10 +3865,12 @@ function initialize() {
const dataFrom = JSON.parse(dataFormStr);
const dataTo = getMemberArrayIndexFromMonHead(this);
const isCopy = document.getElementById("change-swap-to-copy").checked ^ event.ctrlKey;
if ((dataTo[0] !== dataFrom[0]) ||
(dataTo[1] !== dataFrom[1]) ||
(dataTo[2] !== dataFrom[2])) { //必须有所不同才继续交换
interchangeCard(dataFrom, dataTo, event.ctrlKey);
interchangeCard(dataFrom, dataTo, isCopy);
}
}
else if (dataCardId = event.dataTransfer.getData('card-id')) {
@ -3953,7 +3955,7 @@ function initialize() {
}
function interchangeCard(formArr, toArr, isCopy) {
//优先使用传入的复制,然后才是考虑开关
isCopy = isCopy ?? controlBox.querySelector("#change-swap-to-copy").checked; //储存交换“复制”和“替换”
isCopy = isCopy ?? document.getElementById("change-swap-to-copy").checked; //储存交换“复制”和“替换”
const [fromTeamNum, fromIsAssist, fromIndexInTeam] = formArr;
const [toTeamNum, toIsAssist, toIndexInTeam] = toArr;

View File

@ -53731,7 +53731,7 @@ const cachesMap = new Map([
],
[
"multi.html",
"a73fd998c214214011b8b7102f600eb6"
"7767c73c5f80725d6e4ef6c6f7356223"
],
[
"script-custom_elements.js",
@ -53751,11 +53751,11 @@ const cachesMap = new Map([
],
[
"script.js",
"78cc0f9c595940f85289465d3956318e"
"edfdfcad6de81eafba1c3d3d8a796186"
],
[
"solo.html",
"47c3b888f74ae8118ec0e5ca47229628"
"95a7afd45c572ab804917e29d1783e60"
],
[
"style-fix-html2canvas.css",
@ -53775,7 +53775,7 @@ const cachesMap = new Map([
],
[
"triple.html",
"60b445065541fbb1138640eb089f96d2"
"56f9ee4a50b32f0d896b5154c801d45b"
],
[
"languages/en.css",