How to avoid the transformControl object change when move the transformControl object

Dear all,

Here is my demo, for the transform control, if i drag the object A, and the arrow stopped on object B, the transform controller will move to object B. How to avoid this situation.


I’m not sure I understand the logic of your event listeners. But doing this:

container.addEventListener( 'mouseup', function ( e ) {
	if (transformControl.object) {
		focusedTransformObj = transformControl.object;
	if (currentModule == 0 && ! controlsMoved) {
		onDocumentMouseDown( e );
}, false );

somewhat explains the problematic behavior since you trigger the mousedown logic in the mouseup event listener when certain conditions are true. Like I said before, I don’t understand why you are doing this but commenting out the usage of onDocumentMouseDown() and call it in the mouseDown() event listener seems to stop the above behavior.

It might be a reason. There is a function checkIntersection, maybe I am calling this function in wrong position. Let me double check. thanks