chore: 兼容 onActiveChange 方法

refactor: 增加拖拽时 insertion 动画效果
This commit is contained in:
力皓 2020-12-02 10:54:12 +08:00
parent 3a4d47a388
commit 219436afe0
3 changed files with 9 additions and 0 deletions

View File

@ -170,6 +170,7 @@ export class InsertionView extends Component<{ host: BuiltinSimulatorHost }> {
}
}
style.transform = `translate3d(${x}px, ${y}px, 0)`;
style.transition = 'all 0.2s ease-in-out';
return <div className={className} style={style} />;
}

View File

@ -141,6 +141,13 @@ export default class PanelDock implements IWidget {
showPanel() {
this.panel?.setActive(true);
}
/**
* @deprecated
*/
onActiveChange(func: () => any) {
return this.panel?.onActiveChange(func);
}
}

View File

@ -86,6 +86,7 @@
height: @treeNodeHeight;
box-sizing: border-box;
transform: translateZ(0);
transition: all 0.2s ease-in-out;
&.invalid {
border-color: red;
background-color: rgba(240, 154, 154, 0.719);