Reorder and enhance brush checks in viewport host
This commit is contained in:
@@ -2808,14 +2808,17 @@ export class ViewportHost {
|
|||||||
private getComponentTargetVertexIds(
|
private getComponentTargetVertexIds(
|
||||||
target: ActiveTransformSession["target"]
|
target: ActiveTransformSession["target"]
|
||||||
): WhiteboxVertexId[] {
|
): WhiteboxVertexId[] {
|
||||||
|
if (
|
||||||
|
target.kind !== "brushFace" &&
|
||||||
|
target.kind !== "brushEdge" &&
|
||||||
|
target.kind !== "brushVertex"
|
||||||
|
) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const brush = this.currentDocument?.brushes[target.brushId];
|
const brush = this.currentDocument?.brushes[target.brushId];
|
||||||
|
|
||||||
if (
|
if (brush === undefined) {
|
||||||
brush === undefined ||
|
|
||||||
(target.kind !== "brushFace" &&
|
|
||||||
target.kind !== "brushEdge" &&
|
|
||||||
target.kind !== "brushVertex")
|
|
||||||
) {
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user