diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index bd402be76a..e9bae0bcc6 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -31,7 +31,8 @@ import { isDashboard, isGroupCanvas, isMainCanvas, - isSameCanvas + isSameCanvas, + isTabCanvas } from '@/utils/canvasUtils' import { guid } from '@/views/visualized/data/dataset/form/util' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' @@ -569,7 +570,7 @@ const getTextareaHeight = (element, text) => { } const editStyle = computed(() => { - if (dashboardActive.value || isGroupCanvas(canvasId.value)) { + if (dashboardActive.value || isGroupCanvas(canvasId.value) || isTabCanvas(canvasId.value)) { return { width: '100%', height: '100%' diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index 11fa62ee3e..c6d02e3d52 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -493,6 +493,10 @@ export function isGroupCanvas(canvasId) { return canvasId && canvasId.includes('Group') } +export function isTabCanvas(canvasId) { + return canvasId && canvasId.includes('tab') +} + export function findComponentIndexById(componentId, componentDataMatch = componentData.value) { let indexResult = -1 componentDataMatch.forEach((component, index) => { diff --git a/core/core-frontend/src/utils/style.ts b/core/core-frontend/src/utils/style.ts index c311ed2de1..254122331b 100644 --- a/core/core-frontend/src/utils/style.ts +++ b/core/core-frontend/src/utils/style.ts @@ -182,7 +182,7 @@ export function getComponentRotatedStyle(style) { return style } -export function getCanvasStyle(canvasStyleData, canvasId = 'canvasMain') { +export function getCanvasStyle(canvasStyleData, canvasId = 'canvas-main') { const { backgroundColorSelect, background,