Replace snapValueToGrid with snapWhiteboxPositionValue in ViewportHost
This commit is contained in:
@@ -3005,21 +3005,21 @@ export class ViewportHost {
|
|||||||
case "perspective":
|
case "perspective":
|
||||||
case "top":
|
case "top":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(this.boxCreateIntersection.x, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(this.boxCreateIntersection.x),
|
||||||
y: snapValueToGrid(0, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(0),
|
||||||
z: snapValueToGrid(this.boxCreateIntersection.z, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(this.boxCreateIntersection.z)
|
||||||
};
|
};
|
||||||
case "front":
|
case "front":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(this.boxCreateIntersection.x, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(this.boxCreateIntersection.x),
|
||||||
y: snapValueToGrid(this.boxCreateIntersection.y, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(this.boxCreateIntersection.y),
|
||||||
z: snapValueToGrid(0, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(0)
|
||||||
};
|
};
|
||||||
case "side":
|
case "side":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(0, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(0),
|
||||||
y: snapValueToGrid(this.boxCreateIntersection.y, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(this.boxCreateIntersection.y),
|
||||||
z: snapValueToGrid(this.boxCreateIntersection.z, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(this.boxCreateIntersection.z)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3044,21 +3044,21 @@ export class ViewportHost {
|
|||||||
case "perspective":
|
case "perspective":
|
||||||
case "top":
|
case "top":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(this.boxCreateIntersection.x, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(this.boxCreateIntersection.x),
|
||||||
y: snapValueToGrid(size.y * 0.5, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(size.y * 0.5),
|
||||||
z: snapValueToGrid(this.boxCreateIntersection.z, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(this.boxCreateIntersection.z)
|
||||||
};
|
};
|
||||||
case "front":
|
case "front":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(this.boxCreateIntersection.x, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(this.boxCreateIntersection.x),
|
||||||
y: snapValueToGrid(this.boxCreateIntersection.y, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(this.boxCreateIntersection.y),
|
||||||
z: snapValueToGrid(size.z * 0.5, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(size.z * 0.5)
|
||||||
};
|
};
|
||||||
case "side":
|
case "side":
|
||||||
return {
|
return {
|
||||||
x: snapValueToGrid(size.x * 0.5, DEFAULT_GRID_SIZE),
|
x: this.snapWhiteboxPositionValue(size.x * 0.5),
|
||||||
y: snapValueToGrid(this.boxCreateIntersection.y, DEFAULT_GRID_SIZE),
|
y: this.snapWhiteboxPositionValue(this.boxCreateIntersection.y),
|
||||||
z: snapValueToGrid(this.boxCreateIntersection.z, DEFAULT_GRID_SIZE)
|
z: this.snapWhiteboxPositionValue(this.boxCreateIntersection.z)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user