Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Mar 6, 2025
1 parent 22ec06c commit d51b5e7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ export class ResponsiveStepsLayoutController extends AbstractLayoutController {
attributeFilter: ['colspan', 'data-colspan', 'hidden'],
});

this.__selectResponsiveStep();
this.updateLayout();

requestAnimationFrame(() => this.__selectResponsiveStep());
requestAnimationFrame(() => this.updateLayout());
}

Expand Down Expand Up @@ -97,7 +95,6 @@ export class ResponsiveStepsLayoutController extends AbstractLayoutController {
super.setProps(props);

if (this.isConnected) {
this.__selectResponsiveStep();
this.updateLayout();
}
}
Expand All @@ -113,6 +110,8 @@ export class ResponsiveStepsLayoutController extends AbstractLayoutController {
return;
}

this.__selectResponsiveStep();

/*
The item width formula:
Expand Down Expand Up @@ -231,7 +230,6 @@ export class ResponsiveStepsLayoutController extends AbstractLayoutController {
return;
}

this.__selectResponsiveStep();
this.updateLayout();

host.$.layout.style.opacity = '';
Expand Down

0 comments on commit d51b5e7

Please sign in to comment.