Skip to content

Commit

Permalink
* sidebar: fix animation work on dragging.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Aug 23, 2024
1 parent 4ea4ccf commit 4869b8a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/sidebar/src/vanilla/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Moveable} from '@zui/dnd';
import '@zui/css-icons/src/icons/chevron.css';
import '@zui/split/src/style/index';

import type {SizeSetting, Cash} from '@zui/core';
import type {SizeSetting} from '@zui/core';
import type {SidebarOptions} from '../types';

function calcSize(size: SizeSetting, totalSize: number) {
Expand Down Expand Up @@ -223,11 +223,5 @@ export class Sidebar extends Component<SidebarOptions, {
if (this._moveable?.state) {
$element.removeClass(TRANSITION_CLASS);
}

if (animation) {
this._raf = requestAnimationFrame(() => {
this.$parent.addClass(ANIMATION_CLASS);
});
}
}
}

0 comments on commit 4869b8a

Please sign in to comment.