@tmagic/editor 1.0.0-rc.4 → 1.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/Editor.vue.html +1 -1
- package/coverage/lcov-report/src/components/ContentMenu.vue.html +2 -2
- package/coverage/lcov-report/src/components/Icon.vue.html +1 -1
- package/coverage/lcov-report/src/components/ScrollViewer.vue.html +1 -1
- package/coverage/lcov-report/src/components/ToolButton.vue.html +1 -1
- package/coverage/lcov-report/src/components/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/layouts/AddPageBox.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/Framework.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/NavMenu.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/PropsPanel.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/Resizer.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/index.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/ComponentListPanel.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/LayerMenu.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/LayerPanel.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/Sidebar.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/TabPane.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/sidebar/index.html +1 -1
- package/coverage/lcov-report/src/layouts/workspace/PageBar.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/workspace/Stage.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/workspace/ViewerMenu.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/workspace/Workspace.vue.html +1 -1
- package/coverage/lcov-report/src/layouts/workspace/index.html +1 -1
- package/coverage/lcov-report/src/services/BaseService.ts.html +1 -1
- package/coverage/lcov-report/src/services/componentList.ts.html +1 -1
- package/coverage/lcov-report/src/services/editor.ts.html +1 -1
- package/coverage/lcov-report/src/services/events.ts.html +1 -1
- package/coverage/lcov-report/src/services/history.ts.html +1 -1
- package/coverage/lcov-report/src/services/index.html +1 -1
- package/coverage/lcov-report/src/services/props.ts.html +1 -1
- package/coverage/lcov-report/src/services/ui.ts.html +1 -1
- package/coverage/lcov-report/src/type.ts.html +1 -1
- package/coverage/lcov-report/src/utils/compose.ts.html +1 -1
- package/coverage/lcov-report/src/utils/config.ts.html +1 -1
- package/coverage/lcov-report/src/utils/editor.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/index.ts.html +1 -1
- package/coverage/lcov-report/src/utils/logger.ts.html +1 -1
- package/coverage/lcov-report/src/utils/props.ts.html +1 -1
- package/coverage/lcov-report/src/utils/scroll-viewer.ts.html +1 -1
- package/coverage/lcov-report/src/utils/undo-redo.ts.html +1 -1
- package/dist/tmagic-editor.es.js +7 -4
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +7 -4
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +7 -7
- package/src/components/ContentMenu.vue +2 -2
- package/src/utils/editor.ts +6 -2
|
@@ -772,9 +772,12 @@
|
|
|
772
772
|
};
|
|
773
773
|
const setTop2Middle = (node, parentNode, stage) => {
|
|
774
774
|
const style = node.style || {};
|
|
775
|
-
|
|
776
|
-
if (!stage || typeof style.top !== "undefined" || !parentNode.style
|
|
775
|
+
let height = style.height || 0;
|
|
776
|
+
if (!stage || typeof style.top !== "undefined" || !parentNode.style)
|
|
777
777
|
return style;
|
|
778
|
+
if (!utils.isNumber(height)) {
|
|
779
|
+
height = 0;
|
|
780
|
+
}
|
|
778
781
|
const { height: parentHeight } = parentNode.style;
|
|
779
782
|
if (utils.isPage(parentNode)) {
|
|
780
783
|
const { scrollTop = 0, wrapperHeight } = stage.mask;
|
|
@@ -2279,7 +2282,7 @@
|
|
|
2279
2282
|
visible.value = false;
|
|
2280
2283
|
};
|
|
2281
2284
|
vue.onMounted(() => {
|
|
2282
|
-
globalThis.addEventListener("
|
|
2285
|
+
globalThis.addEventListener("mouseup", (e) => {
|
|
2283
2286
|
if (!visible.value || e.target && menu.value?.contains(e.target)) {
|
|
2284
2287
|
return;
|
|
2285
2288
|
}
|
|
@@ -2303,7 +2306,7 @@
|
|
|
2303
2306
|
}
|
|
2304
2307
|
menuStyle.value = {
|
|
2305
2308
|
top: `${top}px`,
|
|
2306
|
-
left: `${e.clientX}px`
|
|
2309
|
+
left: `${e.clientX + 2}px`
|
|
2307
2310
|
};
|
|
2308
2311
|
});
|
|
2309
2312
|
},
|