From 399c883dc810cdb7a26a8424298b08b62d41b7a9 Mon Sep 17 00:00:00 2001 From: Dmytro Soldatov Date: Thu, 29 Jun 2023 23:14:40 +0300 Subject: [PATCH] Update story for better testing this edge case --- src/stories/scrollBox/ScrollBoxGraphics.stories.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/stories/scrollBox/ScrollBoxGraphics.stories.ts b/src/stories/scrollBox/ScrollBoxGraphics.stories.ts index 902e7b0e..4aef545d 100644 --- a/src/stories/scrollBox/ScrollBoxGraphics.stories.ts +++ b/src/stories/scrollBox/ScrollBoxGraphics.stories.ts @@ -47,7 +47,10 @@ export const UseGraphics: StoryFn = ({ for (let i = 0; i < itemsAmount; i++) { - const buttonWrapper = new Container(); + const buttonWrapper1 = new Container(); + const buttonWrapper2 = new Container(); + + buttonWrapper1.addChild(buttonWrapper2); const button = new FancyButton({ defaultView: new Graphics().beginFill(0xa5e24d).drawRoundedRect(0, 0, elementsWidth, elementsHeight, radius), @@ -59,12 +62,12 @@ export const UseGraphics: StoryFn = ({ }) }); - buttonWrapper.addChild(button); + buttonWrapper2.addChild(button); button.anchor.set(0); button.onPress.connect(() => onPress(i + 1)); - items.push(buttonWrapper); + items.push(buttonWrapper1); } // Component usage !!!