|
|
|
|
@ -9,6 +9,7 @@ import {
@@ -9,6 +9,7 @@ import {
|
|
|
|
|
import { |
|
|
|
|
isEmbeddableElement, |
|
|
|
|
isIframeLikeElement, |
|
|
|
|
isTextElement, |
|
|
|
|
} from "../element/typeChecks"; |
|
|
|
|
import { renderElement } from "../renderer/renderElement"; |
|
|
|
|
import { createPlaceholderEmbeddableLabel } from "../element/embeddable"; |
|
|
|
|
@ -28,6 +29,7 @@ import {
@@ -28,6 +29,7 @@ import {
|
|
|
|
|
} from "../components/hyperlink/helpers"; |
|
|
|
|
import { bootstrapCanvas, getNormalizedCanvasDimensions } from "./helpers"; |
|
|
|
|
import { throttleRAF } from "../utils"; |
|
|
|
|
import { getBoundTextElement } from "../element/textElement"; |
|
|
|
|
|
|
|
|
|
const strokeGrid = ( |
|
|
|
|
context: CanvasRenderingContext2D, |
|
|
|
|
@ -236,13 +238,22 @@ const _renderStaticScene = ({
@@ -236,13 +238,22 @@ const _renderStaticScene = ({
|
|
|
|
|
try { |
|
|
|
|
const frameId = element.frameId || appState.frameToHighlight?.id; |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
isTextElement(element) && |
|
|
|
|
element.containerId && |
|
|
|
|
elementsMap.has(element.containerId) |
|
|
|
|
) { |
|
|
|
|
// will be rendered with the container
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
context.save(); |
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
frameId && |
|
|
|
|
appState.frameRendering.enabled && |
|
|
|
|
appState.frameRendering.clip |
|
|
|
|
) { |
|
|
|
|
context.save(); |
|
|
|
|
|
|
|
|
|
const frame = getTargetFrame(element, elementsMap, appState); |
|
|
|
|
|
|
|
|
|
// TODO do we need to check isElementInFrame here?
|
|
|
|
|
@ -258,7 +269,6 @@ const _renderStaticScene = ({
@@ -258,7 +269,6 @@ const _renderStaticScene = ({
|
|
|
|
|
renderConfig, |
|
|
|
|
appState, |
|
|
|
|
); |
|
|
|
|
context.restore(); |
|
|
|
|
} else { |
|
|
|
|
renderElement( |
|
|
|
|
element, |
|
|
|
|
@ -270,6 +280,22 @@ const _renderStaticScene = ({
@@ -270,6 +280,22 @@ const _renderStaticScene = ({
|
|
|
|
|
appState, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const boundTextElement = getBoundTextElement(element, allElementsMap); |
|
|
|
|
if (boundTextElement) { |
|
|
|
|
renderElement( |
|
|
|
|
boundTextElement, |
|
|
|
|
elementsMap, |
|
|
|
|
allElementsMap, |
|
|
|
|
rc, |
|
|
|
|
context, |
|
|
|
|
renderConfig, |
|
|
|
|
appState, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
context.restore(); |
|
|
|
|
|
|
|
|
|
if (!isExporting) { |
|
|
|
|
renderLinkIcon(element, context, appState, elementsMap); |
|
|
|
|
} |
|
|
|
|
|