Skip to content

mihasya/yui3piemenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

Piemenu YUI3 Widget by Mikhail Panchenko <m@mihasya.com>

This is a simple YUI3 widget for creating a Pie menu. By default, it expects 
that the items intended as menu items will be within the container div. Methods
to add items to it from within javascript will be added shortly.

P1:
@todo extensive demos/docs
@todo make all animations optional; only load anim module when needed
@todo add validation to ATTR, as well as "writeOnce" where appropriate


P2:
@todo two _anim objects for items, conscious of each other (buffering)
        i.e. if one is actively running, assign next animation to the 
        other one and only stop the first one when the second one is ready to go
@todo figure out if it's possible to animate along a curve so rotate animations
        can be single animation objects, instead of the new position having to
        be recalculated all the damn time.
@todo "swaying" idle animation (customizable)
@todo move all styles to a css file
@todo replace pieItem class by just extending the element itself, give it props
        so that they can be passed directly to the click event
@todo fix improper positioning when anchor is set to topLeft
        

DONE:
@todo add "move" method for adjusting x and y (conscious of anchor)
@todo move item positioning into main class as a method for easy customization
@todo shrink and expand items when closing and opening
@todo add "close" method that animates the items to the middle, then hides
@todo cutomizable animation speeds
@todo add "hard" reposition methods to pieItem to manually shift the elements
        without animation
@todo add an overlay that prevents anything outside the menu from being clicked
        when it's open and closes the menu when clicked itself.
@todo test that the overlay works correctly if more content is appended 
        my guess is that it does not.... (I was correct... fixed in 11697a5)
@todo add events to communicate state
@todo add an event for when an item is clicked, figure out what to pass it

About

A Pie menu for YUI3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published