From e765fc173f85e8a5dbe4e0d896ce872714b62bcf Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Thu, 4 Jan 2024 16:28:18 -0800 Subject: [PATCH] fix: use setShadowState instead of setShadow --- examples/developer-tools/src/blocks/factory_base.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/developer-tools/src/blocks/factory_base.ts b/examples/developer-tools/src/blocks/factory_base.ts index b2131fb913..81171ccada 100644 --- a/examples/developer-tools/src/blocks/factory_base.ts +++ b/examples/developer-tools/src/blocks/factory_base.ts @@ -68,13 +68,11 @@ export const factoryBase = { }, connectOutputShadow: function (outputType: string) { // Helper method to create & connect shadow block. - const type = this.workspace.newBlock('type'); - type.setShadow(true); - type.outputConnection.connect(this.getInput(outputType).connection); - type.initSvg(); - if (this.rendered) { - type.render(); - } + const connection = this.getInput(outputType).connection; + const shadowState = { + type: 'type', + }; + connection.setShadowState(shadowState); }, updateShape: function (option: string) { const outputExists = this.getInput('OUTPUTTYPE');