Skip to content

Commit

Permalink
Anchor 动画优化。
Browse files Browse the repository at this point in the history
 - close ant-design#3832
 - 点击后给样式就行了, 不要把动画删掉
  • Loading branch information
RaoHai committed Nov 25, 2016
1 parent bd55d21 commit 500126e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions components/anchor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ export default class Anchor extends React.Component<AnchorProps, any> {
}

clickAnchorLink = (href, component) => {
this.refs.ink.style.transition = 'top 0.01s ease-in-out';
this._avoidInk = true;
this.refs.ink.style.top = `${component.offsetTop + component.clientHeight / 2 - 4.5}px`;
this.anchorHelper.scrollTo(href, getDefaultTarget, () => {
this.refs.ink.style.transition = 'top 0.3s ease-in-out';
this._avoidInk = false;
});
}
Expand Down

0 comments on commit 500126e

Please sign in to comment.