diff --git a/plugin-src/transformers/partials/transformChildren.ts b/plugin-src/transformers/partials/transformChildren.ts index 4523f8ff..6a944713 100644 --- a/plugin-src/transformers/partials/transformChildren.ts +++ b/plugin-src/transformers/partials/transformChildren.ts @@ -1,4 +1,4 @@ -import { translateMaskChildren, translateNonMaskChildren } from '@plugin/translators'; +import { translateChildren, translateMaskChildren } from '@plugin/translators'; import { Children } from '@ui/lib/types/utils/children'; @@ -17,6 +17,6 @@ export const transformChildren = async ( return { children: containsMask ? await translateMaskChildren(node.children, maskIndex, baseX, baseY) - : await translateNonMaskChildren(node.children, baseX, baseY) + : await translateChildren(node.children, baseX, baseY) }; }; diff --git a/plugin-src/translators/translateChildren.ts b/plugin-src/translators/translateChildren.ts index 62cb2b8c..3f390f4f 100644 --- a/plugin-src/translators/translateChildren.ts +++ b/plugin-src/translators/translateChildren.ts @@ -18,12 +18,8 @@ export const translateMaskChildren = async ( baseY: number ): Promise => { const maskChild = children[maskedIndex]; - const unmaskedChildren = await translateNonMaskChildren( - children.slice(0, maskedIndex), - baseX, - baseY - ); - const maskedChildren = await translateNonMaskChildren(children.slice(maskedIndex), baseX, baseY); + const unmaskedChildren = await translateChildren(children.slice(0, maskedIndex), baseX, baseY); + const maskedChildren = await translateChildren(children.slice(maskedIndex), baseX, baseY); const maskGroup = { ...transformGroupNodeLike(maskChild, baseX, baseY), @@ -34,7 +30,7 @@ export const translateMaskChildren = async ( return [...unmaskedChildren, maskGroup]; }; -export const translateNonMaskChildren = async ( +export const translateChildren = async ( children: readonly SceneNode[], baseX: number, baseY: number