Commit d169804b authored by zhengke's avatar zhengke

TextElement 调整

parent e213bb29
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
width: elementInfo.width + 'px', width: elementInfo.width + 'px',
height: elementInfo.height + 'px', height: elementInfo.height + 'px',
}" }"
style="overflow: hidden;"
> >
<div <div
class="rotate-wrapper" class="rotate-wrapper"
...@@ -76,7 +75,6 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot' ...@@ -76,7 +75,6 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
import ElementOutline from '@/views/components/element/ElementOutline.vue' import ElementOutline from '@/views/components/element/ElementOutline.vue'
import ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue' import ProsemirrorEditor from '@/views/components/element/ProsemirrorEditor.vue'
import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
const props = defineProps<{ const props = defineProps<{
elementInfo: PPTTextElement elementInfo: PPTTextElement
...@@ -137,12 +135,9 @@ const updateTextElementHeight = (entries: ResizeObserverEntry[]) => { ...@@ -137,12 +135,9 @@ const updateTextElementHeight = (entries: ResizeObserverEntry[]) => {
let realHeight = contentRect.height + 20 let realHeight = contentRect.height + 20
const realWidth = contentRect.width + 20 const realWidth = contentRect.width + 20
const documentHeight = useSlidesStore().viewportRatio>1?VIEWPORT_SIZE.Value:VIEWPORT_VER_SIZE.Value
if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) { if (!props.elementInfo.vertical && props.elementInfo.height !== realHeight) {
if (!isScaling.value) { if (!isScaling.value) {
const maxHeight = documentHeight - props.elementInfo.top - 10
realHeight = realHeight<=maxHeight?realHeight:maxHeight
slidesStore.updateElement({ slidesStore.updateElement({
id: props.elementInfo.id, id: props.elementInfo.id,
props: { height: realHeight }, props: { height: realHeight },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment