Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberDex committed Jul 30, 2024
1 parent 30a575d commit 42e2993
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lint": "xs lint --max-warnings 0",
"lint:fix": "xs lint --fix",
"prepare": "husky install",
"release": "xs bump,build,docs && npm run release:dist && xs git-push",
"release": "npm i && xs bump,build,docs && npm run release:dist && xs git-push",
"release:dist": "npm publish --tag latest-1.x",
"serve": "xs serve",
"storybook": "storybook dev -p 6006",
Expand Down
10 changes: 6 additions & 4 deletions src/ScrollBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ export class ScrollBox extends Container

this.stopRenderHiddenItems();


const newScrollPos = isVertical ? this.scrollY : this.scrollX;

if (newScrollPos !== oldScrollPos) {
if (newScrollPos !== oldScrollPos)
{
this.onScroll?.emit(newScrollPos);
}
}
Expand Down Expand Up @@ -881,11 +881,13 @@ export class ScrollBox extends Container
}
}

get scrollHeight(): number {
get scrollHeight(): number
{
return this.list.height;
}

get scrollWidth(): number {
get scrollWidth(): number
{
return this.list.width;
}
}
6 changes: 0 additions & 6 deletions src/stories/scrollBox/ScrollBoxGraphics.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ export const UseGraphics: StoryFn = ({

scrollBox.addItems(items);

scrollBox.onScroll.connect((scroll) => console.log({
scroll,
scrollHeight: scrollBox.scrollHeight,
scrollWidth: scrollBox.scrollWidth
}));

view.addChild(scrollBox);

return {
Expand Down

0 comments on commit 42e2993

Please sign in to comment.