@@ -32,7 +32,9 @@ const convertUnits = (
32
32
}
33
33
case Units . MILLIMETERS : {
34
34
// convert m to mm
35
- return ( dist / 0.001 ) . toFixed ( Constants . textUnitsDecimalPlaces ) + " " + units ;
35
+ return (
36
+ ( dist / 0.001 ) . toFixed ( Constants . textUnitsDecimalPlaces ) + " " + units
37
+ ) ;
36
38
}
37
39
default : {
38
40
break ;
@@ -43,7 +45,11 @@ const convertUnits = (
43
45
switch ( units ) {
44
46
case Units . METERS : {
45
47
// convert mm to m
46
- return ( dist / 1000.0 ) . toFixed ( Constants . textUnitsDecimalPlaces ) + " " + units ;
48
+ return (
49
+ ( dist / 1000.0 ) . toFixed ( Constants . textUnitsDecimalPlaces ) +
50
+ " " +
51
+ units
52
+ ) ;
47
53
}
48
54
case Units . MILLIMETERS : {
49
55
return dist . toFixed ( Constants . textUnitsDecimalPlaces ) + " " + units ;
@@ -89,7 +95,10 @@ export const Edges: FunctionalComponent<EdgesProps> = (
89
95
90
96
const textOffset : THREE . Vector3 = new THREE . Vector3 ( 0 , 2.5 , 0 ) ;
91
97
const scale = ( node1 . scale + node2 . scale ) / 2 ;
92
- const radius = ( ( boundingSphereRadius * edgeSize ) > edgeMinSize ) ? ( boundingSphereRadius * edgeSize ) : edgeMinSize ;
98
+ const radius =
99
+ boundingSphereRadius * edgeSize > edgeMinSize
100
+ ? boundingSphereRadius * edgeSize
101
+ : edgeMinSize ;
93
102
textOffset . multiplyScalar ( scale ) ;
94
103
95
104
const textV = convertUnits ( dist , displayMode , units ) ;
@@ -107,7 +116,8 @@ export const Edges: FunctionalComponent<EdgesProps> = (
107
116
// New method: nodes are consistent (using scale determined by Constants edgeSize)
108
117
const entityScale = 1 ;
109
118
110
- const textEntityScale = ( frustrumDistance / boundingSphereRadius ) *
119
+ const textEntityScale =
120
+ ( frustrumDistance / boundingSphereRadius ) *
111
121
Constants . frustrumScaleFactor ;
112
122
113
123
return (
0 commit comments