Transformcontrols rotation flip on axis

While using transformcontrols, I was getting the rotation being flipped at specific angle especially at 90 degrees (gimbal), i tried changing the euler order maybe it will fix things, still same issue. So I looked at the source code and wonder why i was able to have free form rotation on the E axis. I noticed the way the rotation were handled is a bit different, so I’m wondering why we can’t just do this, doing this I was able to get my free form rotation in each axis

this.rotationAxis.copy(_unit[ axis ]);

				_tempVector.copy( _unit[ axis ] );

				if ( space === 'local' ) {
					_tempVector.applyQuaternion( this.worldQuaternion );
				}
				// When _tempVector is 0 after cross with this.eye the vectors are parallel and should use in-plane rotation logic.
				// if ( _tempVector.length() === 0 ) {

				// 	_inPlaneRotation = true;
				// 	console.log( 'In Plane')

				// } else {

				// 	this.rotationAngle = this._offset.dot( _tempVector.normalize() ) * ROTATION_SPEED;

				// }
				this.rotationAngle = this.pointEnd.angleTo( this.pointStart );

				this._startNorm.copy( this.pointStart ).normalize();
				this._endNorm.copy( this.pointEnd ).normalize();

				this.rotationAngle *= ( this._endNorm.cross( this._startNorm ).dot( _tempVector.normalize() ) < 0 ? 1 : - 1 );