-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added utils.events.dispatch #62
Open
MistahWrite
wants to merge
8
commits into
scottschiller:master
Choose a base branch
from
MistahWrite:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code from https://github.com/scottschiller/SoundManager2/blob/3c8cc67f3cbb421753b9 b4114ece33de3097e64e/demo/bar-ui/script/bar-ui.js
utils.events.dispatch creates a CustomEvent We can use this to dispatch events from certain places inside bar-ui.js so that external scripts may listen for that event and act accordingly
Reverted from CustomEvent to standard Event for IE compatibility as well as simplicity. There was a bug in the properties I passed as well, but I’m not going to get into it and I wasn’t able to properly pass custom event details for some reason anyways. This works just fine.
Reverted from Custom Event to stand Event for a number of reasons |
allow setTitle to be accessed via window.sm2BarPlayers[0].setTitle(item);
Conflicts: demo/bar-ui/script/bar-ui.js
Added dispatch function to utils.events and then dispatched a couple events from 2 key locations I’m currently using.
previous and menu interfered with the theme I have on Wordpress so I renamed them to something more specific
I have merged so that we can get a clean look, and added a few suggestions for the style because the names next, previous, and menu conflicted with my wordpress theme causing the buttons to not show up. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I could not create a fork from https://github.com/scottschiller/SoundManager2/blob/3c8cc67f3cbb421753b9b4114ece33de3097e64e/demo/bar-ui/script/bar-ui.js
and when I copied and pasted the tabs turned to spaces. Please review the most recent commits to find the differences considering I wanted the above link to be the base fork.