Skip to content
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
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

MistahWrite
Copy link

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.

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.
@MistahWrite
Copy link
Author

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
@MistahWrite
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants