feat: support customizing what parts of frames are rendered (#6752)

This commit is contained in:
David Luzar
2023-07-10 17:13:44 +02:00
committed by GitHub
parent 49e4289878
commit cf0413338e
10 changed files with 472 additions and 88 deletions

View File

@@ -931,7 +931,11 @@ export const renderElement = (
break;
}
case "frame": {
if (!renderConfig.isExporting && appState.shouldRenderFrames) {
if (
!renderConfig.isExporting &&
appState.frameRendering.enabled &&
appState.frameRendering.outline
) {
context.save();
context.translate(
element.x + renderConfig.scrollX,

View File

@@ -470,7 +470,9 @@ export const _renderScene = ({
if (
frameId &&
((renderConfig.isExporting && isOnlyExportingSingleFrame(elements)) ||
(!renderConfig.isExporting && appState.shouldRenderFrames))
(!renderConfig.isExporting &&
appState.frameRendering.enabled &&
appState.frameRendering.clip))
) {
context.save();