Add option to ignore empty reference #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an option to disable the default transition behaviour where passing a nil value to transition's
transition.pause()
,transition.resume()
ortransition.cancel()
API will control all existing transitions.Some users, myself included, have had issues with accidentally passing an already removed transition reference to one of the aforementioned functions, which has unintentionally affected all existing transitions.
This new feature will allow users to optionally prevent that behaviour. These code changes will not break (or even affect) any existing projects. If a user wishes to prevent this default behaviour, then they simply need to set:
transition.ignoreEmptyReference = true
This PR also introduces 3 new API calls that the users can use to explicitly control all existing transitions:
transition.pauseAll()
,transition.resumeAll()
ortransition.cancelAll()
. These new API calls are in line with the new and pending timer API calls.Fixes coronalabs/corona#55