refactor: refactor util calc

This commit is contained in:
chenshenhai 2023-06-11 13:33:32 +08:00
parent 3aba19d564
commit dcc3432249

View file

@ -134,8 +134,8 @@ export class BoardWatcher extends EventEmitter<BoardWatcherEventMap> {
}
private _isVaildPoint(p: Point): boolean {
const viewSizeInfo = this._opts.sharer.getActiveViewSizeInfo();
const { width, height } = viewSizeInfo;
const viewSize = this._opts.sharer.getActiveViewSizeInfo();
const { width, height } = viewSize;
if (isBoardAvailableNum(p.x) && isBoardAvailableNum(p.y) && p.x <= width && p.y <= height) {
return true;
}