fix: board point-check

This commit is contained in:
chenshenhai 2021-10-17 11:35:49 +08:00
parent 844f4f5695
commit d218cabd7a
2 changed files with 14 additions and 4 deletions

View file

@ -194,7 +194,12 @@ export class ScreenWatcher {
}
private _isVaildPoint(p: TypePoint): boolean {
return ( p.x > 0 && p.y > 0);
return isAvailableNum(p.x) && isAvailableNum(p.y);
}
}
function isAvailableNum(num: any): boolean {
return (num > 0 || num < 0 || num === 0);
}

View file

@ -25,7 +25,7 @@ html, body {
}
.dashboard .row {
margin-top: 20px;
/* margin-top: 20px; */
display: flex;
width: 100%;
flex-direction: row;
@ -33,8 +33,8 @@ html, body {
.dashboard .row .col {
display: flex;
flex: 1;
width: 100%;
/* flex: 1;
width: 100%; */
}
.center {
@ -95,4 +95,9 @@ html, body {
.elem-item-btn:hover {
color: #4183c4;
border-color: #4183c4;
}
#mount {
margin-top: 100px;
margin-left: 200px;
}