chore: erfine

This commit is contained in:
Yanyan-Wang 2021-05-31 15:41:05 +08:00 committed by Yanyan Wang
parent 4f802a822e
commit ac8b8c1573
2 changed files with 3 additions and 3 deletions

View File

@ -34,8 +34,8 @@ export default class Edge extends Item implements IEdge {
// 如果设置成具体的点,则清理节点
this.set(pointName, value);
this.set(itemName, null);
} else {
value!.addEdge(this);
} else if (value) {
value.addEdge(this);
this.set(itemName, value);
this.set(pointName, null);
}

View File

@ -357,7 +357,7 @@ export const translate = (group: IGroup, vec: Point) => {
* @param group Group
* @param point
*/
export const move = (group: IGroup, point: Point, animate?: boolean, animateCfg?: GraphAnimateConfig = {}) => {
export const move = (group: IGroup, point: Point, animate?: boolean, animateCfg?: GraphAnimateConfig = { duration: 500 }) => {
let matrix: Matrix = group.getMatrix();
if (!matrix) {
matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];