Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 7819b30

Browse files
Include AOI label in filtered output, and deal better with missing labels
Thanks again to Dilek Akkus for the awesome and diligent bug-hunting!
1 parent 1a2881a commit 7819b30

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/builder/src/logic/io/assemble/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ const processContent = (nodeType, content) => {
121121
'lineHeight', 'textAlign', 'textBaseline',
122122
// Image
123123
'src', 'autoscale',
124+
// AOI
125+
'label',
124126
]))
125127
default:
126128
return content

packages/library/src/util/canvas.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,6 @@ export const makePath = (ctx, content) => {
261261
export const makePathFunction = (content) => (ts, canvas, ctx) =>
262262
fromPairs(
263263
content
264-
.filter(c => ['aoi'].includes(c.type)) // Currently supported content
265-
.map(c => [c.label, makePath(ctx, c)]) // Key / path pairs
264+
.filter(c => c.label && ['aoi'].includes(c.type)) // Supported objects
265+
.map(c => [c.label, makePath(ctx, c)]) // Make key / path pairs
266266
)

0 commit comments

Comments
 (0)