@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
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.0-rc.
|
|
2
|
+
"version": "1.0.0-rc.5",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"dist/*",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@babel/core": "^7.18.0",
|
|
47
47
|
"@element-plus/icons": "0.0.11",
|
|
48
|
-
"@tmagic/core": "^1.0.0-rc.
|
|
49
|
-
"@tmagic/form": "^1.0.0-rc.
|
|
50
|
-
"@tmagic/schema": "^1.0.0-rc.
|
|
51
|
-
"@tmagic/stage": "^1.0.0-rc.
|
|
52
|
-
"@tmagic/utils": "^1.0.0-rc.
|
|
48
|
+
"@tmagic/core": "^1.0.0-rc.5",
|
|
49
|
+
"@tmagic/form": "^1.0.0-rc.5",
|
|
50
|
+
"@tmagic/schema": "^1.0.0-rc.5",
|
|
51
|
+
"@tmagic/stage": "^1.0.0-rc.5",
|
|
52
|
+
"@tmagic/utils": "^1.0.0-rc.5",
|
|
53
53
|
"buffer": "^6.0.3",
|
|
54
54
|
"color": "^3.1.3",
|
|
55
55
|
"element-plus": "^2.2.0",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"vite-plugin-dts": "^0.9.6",
|
|
89
89
|
"vue-tsc": "^0.0.24"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "d147b361d7e6123cda99c6ba68a2ac7e074be37f"
|
|
92
92
|
}
|
|
@@ -49,7 +49,7 @@ export default defineComponent({
|
|
|
49
49
|
|
|
50
50
|
onMounted(() => {
|
|
51
51
|
globalThis.addEventListener(
|
|
52
|
-
'
|
|
52
|
+
'mouseup',
|
|
53
53
|
(e: MouseEvent) => {
|
|
54
54
|
if (!visible.value || (e.target && menu.value?.contains(e.target as HTMLElement))) {
|
|
55
55
|
return;
|
|
@@ -82,7 +82,7 @@ export default defineComponent({
|
|
|
82
82
|
|
|
83
83
|
menuStyle.value = {
|
|
84
84
|
top: `${top}px`,
|
|
85
|
-
left: `${e.clientX}px`,
|
|
85
|
+
left: `${e.clientX + 2}px`,
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
},
|
package/src/utils/editor.ts
CHANGED
|
@@ -142,9 +142,13 @@ export const toRelative = (node: MNode) => {
|
|
|
142
142
|
|
|
143
143
|
const setTop2Middle = (node: MNode, parentNode: MNode, stage: StageCore) => {
|
|
144
144
|
const style = node.style || {};
|
|
145
|
-
|
|
145
|
+
let height = style.height || 0;
|
|
146
146
|
|
|
147
|
-
if (!stage || typeof style.top !== 'undefined' || !parentNode.style
|
|
147
|
+
if (!stage || typeof style.top !== 'undefined' || !parentNode.style) return style;
|
|
148
|
+
|
|
149
|
+
if (!isNumber(height)) {
|
|
150
|
+
height = 0;
|
|
151
|
+
}
|
|
148
152
|
|
|
149
153
|
const { height: parentHeight } = parentNode.style;
|
|
150
154
|
|