@@ -258,14 +258,17 @@ export const PivotControls: ForwardRefComponent<PivotControlsProps, THREE.Group>
258258
259259 React . useImperativeHandle ( fRef , ( ) => ref . current , [ ] )
260260
261- const disableAxesFinal = Array . isArray ( disableAxes ) ? disableAxes : [ disableAxes , disableAxes , disableAxes ]
262- const disableSlidersFinal = Array . isArray ( disableSliders )
261+ const disableTranslationAxes = Array . isArray ( disableAxes ) ? disableAxes : [ disableAxes , disableAxes , disableAxes ]
262+
263+ const disablePlaneSliderAxes = Array . isArray ( disableSliders )
263264 ? disableSliders
264265 : [ disableSliders , disableSliders , disableSliders ]
265- const disableRotationsFinal = Array . isArray ( disableRotations )
266+
267+ const disableRotationAxes = Array . isArray ( disableRotations )
266268 ? disableRotations
267269 : [ disableRotations , disableRotations , disableRotations ]
268- const disableScalingFinal = Array . isArray ( disableScaling )
270+
271+ const disableScalingAxes = Array . isArray ( disableScaling )
269272 ? disableScaling
270273 : [ disableScaling , disableScaling , disableScaling ]
271274
@@ -276,31 +279,31 @@ export const PivotControls: ForwardRefComponent<PivotControlsProps, THREE.Group>
276279 < group visible = { visible } ref = { gizmoRef } position = { offset } rotation = { rotation } >
277280 { enabled && (
278281 < >
279- { ! disableAxesFinal [ 0 ] && activeAxes [ 0 ] && < AxisArrow axis = { 0 } direction = { xDir } /> }
280- { ! disableAxesFinal [ 1 ] && activeAxes [ 1 ] && < AxisArrow axis = { 1 } direction = { yDir } /> }
281- { ! disableAxesFinal [ 2 ] && activeAxes [ 2 ] && < AxisArrow axis = { 2 } direction = { zDir } /> }
282- { ! disableSlidersFinal [ 2 ] && activeAxes [ 0 ] && activeAxes [ 1 ] && (
282+ { ! disableTranslationAxes [ 0 ] && activeAxes [ 0 ] && < AxisArrow axis = { 0 } direction = { xDir } /> }
283+ { ! disableTranslationAxes [ 1 ] && activeAxes [ 1 ] && < AxisArrow axis = { 1 } direction = { yDir } /> }
284+ { ! disableTranslationAxes [ 2 ] && activeAxes [ 2 ] && < AxisArrow axis = { 2 } direction = { zDir } /> }
285+ { ! disablePlaneSliderAxes [ 2 ] && activeAxes [ 0 ] && activeAxes [ 1 ] && (
283286 < PlaneSlider axis = { 2 } dir1 = { xDir } dir2 = { yDir } />
284287 ) }
285- { ! disableSlidersFinal [ 1 ] && activeAxes [ 0 ] && activeAxes [ 2 ] && (
288+ { ! disablePlaneSliderAxes [ 1 ] && activeAxes [ 0 ] && activeAxes [ 2 ] && (
286289 < PlaneSlider axis = { 1 } dir1 = { zDir } dir2 = { xDir } />
287290 ) }
288- { ! disableSlidersFinal [ 0 ] && activeAxes [ 2 ] && activeAxes [ 1 ] && (
291+ { ! disablePlaneSliderAxes [ 0 ] && activeAxes [ 2 ] && activeAxes [ 1 ] && (
289292 < PlaneSlider axis = { 0 } dir1 = { yDir } dir2 = { zDir } />
290293 ) }
291294
292- { ! disableRotationsFinal [ 2 ] && activeAxes [ 0 ] && activeAxes [ 1 ] && (
295+ { ! disableRotationAxes [ 2 ] && activeAxes [ 0 ] && activeAxes [ 1 ] && (
293296 < AxisRotator axis = { 2 } dir1 = { xDir } dir2 = { yDir } />
294297 ) }
295- { ! disableRotationsFinal [ 1 ] && activeAxes [ 0 ] && activeAxes [ 2 ] && (
298+ { ! disableRotationAxes [ 1 ] && activeAxes [ 0 ] && activeAxes [ 2 ] && (
296299 < AxisRotator axis = { 1 } dir1 = { zDir } dir2 = { xDir } />
297300 ) }
298- { ! disableRotationsFinal [ 0 ] && activeAxes [ 2 ] && activeAxes [ 1 ] && (
301+ { ! disableRotationAxes [ 0 ] && activeAxes [ 2 ] && activeAxes [ 1 ] && (
299302 < AxisRotator axis = { 0 } dir1 = { yDir } dir2 = { zDir } />
300303 ) }
301- { ! disableScalingFinal [ 0 ] && activeAxes [ 0 ] && < ScalingSphere axis = { 0 } direction = { xDir } /> }
302- { ! disableScalingFinal [ 1 ] && activeAxes [ 1 ] && < ScalingSphere axis = { 1 } direction = { yDir } /> }
303- { ! disableScalingFinal [ 2 ] && activeAxes [ 2 ] && < ScalingSphere axis = { 2 } direction = { zDir } /> }
304+ { ! disableScalingAxes [ 0 ] && activeAxes [ 0 ] && < ScalingSphere axis = { 0 } direction = { xDir } /> }
305+ { ! disableScalingAxes [ 1 ] && activeAxes [ 1 ] && < ScalingSphere axis = { 1 } direction = { yDir } /> }
306+ { ! disableScalingAxes [ 2 ] && activeAxes [ 2 ] && < ScalingSphere axis = { 2 } direction = { zDir } /> }
304307 </ >
305308 ) }
306309 </ group >
0 commit comments