mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
807db89c5e
commit
41fcb61908
3 changed files with 5 additions and 5 deletions
|
|
@ -1097,6 +1097,6 @@
|
||||||
iconSub
|
iconSub
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="ant/icon.js"></script>
|
<script src="material/icon.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export const openMenuPanel = (protyle: IProtyle,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const target = event.target as HTMLElement;
|
const target = event.target as HTMLElement;
|
||||||
const targetElement = hasClosestByAttribute(target, "data-id", null);
|
const targetElement = hasClosestByAttribute(target, "draggable", "true");
|
||||||
if (!targetElement ||
|
if (!targetElement ||
|
||||||
(!targetElement.classList.contains("dragover__top") && !targetElement.classList.contains("dragover__bottom"))) {
|
(!targetElement.classList.contains("dragover__top") && !targetElement.classList.contains("dragover__bottom"))) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -154,7 +154,7 @@ export const openMenuPanel = (protyle: IProtyle,
|
||||||
let dragoverElement: HTMLElement;
|
let dragoverElement: HTMLElement;
|
||||||
avPanelElement.addEventListener("dragover", (event: DragEvent) => {
|
avPanelElement.addEventListener("dragover", (event: DragEvent) => {
|
||||||
const target = event.target as HTMLElement;
|
const target = event.target as HTMLElement;
|
||||||
const targetElement = hasClosestByAttribute(target, "data-id", null);
|
const targetElement = hasClosestByAttribute(target, "draggable", "true");
|
||||||
if (!targetElement || targetElement.isSameNode(window.siyuan.dragElement)) {
|
if (!targetElement || targetElement.isSameNode(window.siyuan.dragElement)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -172,7 +172,7 @@ export const openMenuPanel = (protyle: IProtyle,
|
||||||
});
|
});
|
||||||
avPanelElement.addEventListener("dragleave", (event) => {
|
avPanelElement.addEventListener("dragleave", (event) => {
|
||||||
const target = event.target as HTMLElement;
|
const target = event.target as HTMLElement;
|
||||||
const targetElement = hasClosestByAttribute(target, "data-id", null);
|
const targetElement = hasClosestByAttribute(target, "draggable", "true");
|
||||||
if (targetElement) {
|
if (targetElement) {
|
||||||
targetElement.classList.remove("dragover__top", "dragover__bottom");
|
targetElement.classList.remove("dragover__top", "dragover__bottom");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: {
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
Array.from(Array(13).keys()).forEach(index => {
|
Array.from(Array(13).keys()).forEach(index => {
|
||||||
menu.addItem({
|
menu.addItem({
|
||||||
current: parseInt(color) === index + 1,
|
accelerator: parseInt(color) === index + 1 ? '<svg class="svg" style="height: 30px; float: left;"><use xlink:href="#iconSelect"></use></svg>' : undefined,
|
||||||
iconHTML: "",
|
iconHTML: "",
|
||||||
label: `<span class="color__square" style="padding: 5px;margin: 2px;color: var(--b3-font-color${index + 1});background-color: var(--b3-font-background${index + 1});">A</span>`,
|
label: `<span class="color__square" style="padding: 5px;margin: 2px;color: var(--b3-font-color${index + 1});background-color: var(--b3-font-background${index + 1});">A</span>`,
|
||||||
click() {
|
click() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue