Jump to content
GreenSock

TryVig

RemoveIgnoredItem doesn't return to _items

Recommended Posts

Hello, I'm using VERSION: 1.92, AS3

 

Wondering if there is a reason that removeIgnoredObject() does not re-add the passed object back into the _items array?

 

I can easily insert this.addItem($object); but want to make sure I'm not breaking something else if that was intentionally left out. Please advise.

 

public function removeIgnoredObject($object:DisplayObject):void {
		for (var i:uint = 0; i < _ignoredObjects.length; i++) {
			if (_ignoredObjects[i] == $object) {
				_ignoredObjects.splice(i, 1);
				addItem($object); // Add this ?
			}
		}
	}

 

THANKS

Link to comment
Share on other sites

I think you might be misunderstanding what ignoredObjects are. They are simply objects that you want TransformManager to ignore in terms of deselection primarily. Like if you have a drop-down menu that you want the user to be able to click on without automatically deselecting whatever items are currently selected, you can add that drop-down as an ignoredObject.

 

If you remove the ignoredObject, it shouldn't tell TransformManager that you now want that object to be selectable/transformable. The two concepts are completely separate.

 

Does that clear things up?

Link to comment
Share on other sites

That helps, thank you.

 

I think I should be instead using item.enabled = false for my purposes.

 

Thanks for the speedy response!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×