-
Notifications
You must be signed in to change notification settings - Fork 231
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
Create Multiple Instances of ResponsiveMultiLevelMenu with unique trigger ID's #27
Open
native-apps
wants to merge
13
commits into
codrops:master
Choose a base branch
from
rejas: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.
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
* commit 'a4c217143a9a70fe275c594242bcc60f5a434922': codrops#23 fixed reset on close is now optional
MIght be too much in this pull request, you seem to have put all my fork-modifications in it. Lets ask the other way round: Whats missing in my fork? |
Considering forking this & converting this to a Polymer Element to avoid this multiple instance conflict. i will post the link if I the conversion is successful. |
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 would assume the best option (i may be wrong here) to have is another Option called something like triggerClassName (or ID) to trigger a target menu when using multiple instances of the plugin. Trigger should be able to work from outside of the menu container for the sake of better layout control. The reason for removing the button outside of the menu is so the menu can have a width that is separate from the button & container.
This addition was added to the script so multiple instances could be used : #7
The reason for this request to have the trigger outside of the menu is for better control over the menu width. As you can see in this screenshot is during the animation the menu is displaying the width of the container (which is determined by how many characters are in the label).

The overall objective is to use multiple menus, and have the buttons to display inline without affecting the width of the menus. Currently the way that the trigger button is inside the container, overlapping would not work due to z-indexing issues. Currently i've achieved a temporary fix by setting a no-wrap overflow style to the container and a fixed-width to the menus which works, but you can see the menu showing a more narrow width that reflects the width of the button-trigger during animation. Also, in mobile mode, the menus are set to 100% width, but the triggers had to be absolutely positioned to be clickable, but it runs into more z-indexing issues. Relative positioning would be much more ideal.
These next two screenshots are Mobile view, and the menus are set to full-width 100% so there is no problem with the width during the animation. Also, the button were positioned absolutely for now, but relative would be ideal and can be accomplished once the buttons are working from outside the container.