Closed umeimmense closed 4 years ago
<RegisterNode name="customNode" config={{ // 设置高度 getSize(item: any) { return [270, 84]; }, setState(name: any, value: any, item: any) { setAnchorPointsState.call( this, name, value, item, (item, anchorPoint) => { const { width, height } = item.getKeyShape().getBBox(); const [x, y] = anchorPoint; return { x: width * x - width / 2, y: height * y - height / 2, }; }, (item, anchorPoint) => { const { width, height } = item.getKeyShape().getBBox(); const [x, y] = anchorPoint; return { x: width * x - width / 2, y: height * y - height / 2, }; }, ); }, getAnchorPoints() { return [[0, 0.5]]; } }} extend="modelRect" />
@gaoli 希望大佬帮忙解答一下
这个功能解决了什么问题
你所期望的 API 是怎样的
@gaoli 希望大佬帮忙解答一下