fix(sidebar): disable frame CSS transition while user is resizing the sidebar to prevent janky animations
This commit is contained in:
@@ -22,6 +22,9 @@ export class WccFrame extends DeesElement {
|
||||
@property({ type: Number })
|
||||
accessor sidebarWidth: number = 200;
|
||||
|
||||
@property({ type: Boolean })
|
||||
accessor isResizing: boolean = false;
|
||||
|
||||
public static styles = [
|
||||
css`
|
||||
:host {
|
||||
@@ -59,7 +62,7 @@ export class WccFrame extends DeesElement {
|
||||
border: 10px solid #ffaeaf;
|
||||
left: ${this.sidebarWidth}px;
|
||||
`}
|
||||
transition: all 0.3s ease;
|
||||
transition: ${this.isResizing ? 'none' : 'all 0.3s ease'};
|
||||
${this.isNative ? 'padding: 0px;' : (() => {
|
||||
switch (this.viewport) {
|
||||
case 'desktop':
|
||||
|
||||
Reference in New Issue
Block a user