|
@@ -164,7 +164,7 @@ export const openMenuPanel = (options: {
|
|
} else if (options.type === "edit") {
|
|
} else if (options.type === "edit") {
|
|
bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr});
|
|
bindEditEvent({protyle: options.protyle, data, menuElement, isCustomAttr});
|
|
} else if (options.type === "config") {
|
|
} else if (options.type === "config") {
|
|
- bindViewEvent({protyle: options.protyle, data, menuElement});
|
|
|
|
|
|
+ bindViewEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (options.cb) {
|
|
if (options.cb) {
|
|
@@ -479,7 +479,7 @@ export const openMenuPanel = (options: {
|
|
} else if (type === "go-config") {
|
|
} else if (type === "go-config") {
|
|
menuElement.innerHTML = getViewHTML(data.view);
|
|
menuElement.innerHTML = getViewHTML(data.view);
|
|
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);
|
|
setPosition(menuElement, tabRect.right - menuElement.clientWidth, tabRect.bottom, tabRect.height);
|
|
- bindViewEvent({protyle: options.protyle, data, menuElement});
|
|
|
|
|
|
+ bindViewEvent({protyle: options.protyle, data, menuElement, blockElement: options.blockElement});
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
event.stopPropagation();
|
|
break;
|
|
break;
|
|
@@ -690,39 +690,6 @@ export const openMenuPanel = (options: {
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
event.stopPropagation();
|
|
break;
|
|
break;
|
|
- } else if (type === "toggle-view-title") {
|
|
|
|
- if (target.firstElementChild.getAttribute("xlink:href") === "#iconEyeoff") {
|
|
|
|
- // hide
|
|
|
|
- transaction(options.protyle, [{
|
|
|
|
- action: "hideAttrViewName",
|
|
|
|
- avID,
|
|
|
|
- blockID,
|
|
|
|
- data: true
|
|
|
|
- }], [{
|
|
|
|
- action: "hideAttrViewName",
|
|
|
|
- avID,
|
|
|
|
- blockID,
|
|
|
|
- data: false
|
|
|
|
- }]);
|
|
|
|
- options.blockElement.querySelector(".av__title").classList.add("av__title--hide");
|
|
|
|
- } else {
|
|
|
|
- transaction(options.protyle, [{
|
|
|
|
- action: "hideAttrViewName",
|
|
|
|
- avID,
|
|
|
|
- blockID,
|
|
|
|
- data: false
|
|
|
|
- }], [{
|
|
|
|
- action: "hideAttrViewName",
|
|
|
|
- avID,
|
|
|
|
- blockID,
|
|
|
|
- data: true
|
|
|
|
- }]);
|
|
|
|
- options.blockElement.querySelector(".av__title").classList.remove("av__title--hide");
|
|
|
|
- }
|
|
|
|
- avPanelElement.remove();
|
|
|
|
- event.preventDefault();
|
|
|
|
- event.stopPropagation();
|
|
|
|
- break;
|
|
|
|
} else if (type === "duplicate-view") {
|
|
} else if (type === "duplicate-view") {
|
|
const id = Lute.NewNodeID();
|
|
const id = Lute.NewNodeID();
|
|
transaction(options.protyle, [{
|
|
transaction(options.protyle, [{
|