Skip to content

Commit

Permalink
Added vertical-top to circle menu
Browse files Browse the repository at this point in the history
  • Loading branch information
knowthelist committed Sep 3, 2017
1 parent 714ff3c commit 69bce57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Use data-url + data-refresh or data-device + data-get, not both.
- **data-border** : style of border - 'round','square' (default 'round')
- **data-item-width** : fixed size for width in px (default value of data-item-diameter)
- **data-item-height** : fixed size for height in px (default value of data-item-diameter)
- **data-direction** : position of the items in relation to the center (default full). Options are: top | right | bottom | left | top-right | top-left | bottom-right | bottom-left | top-half | right-half | bottom-half | left-half | full | vertical | horizontal
- **data-direction** : position of the items in relation to the center (default full). Options are: top | right | bottom | left | top-right | top-left | bottom-right | bottom-left | top-half | right-half | bottom-half | left-half | full | vertical | vertical-top | horizontal
- **class** : keepopen, noshade

####Playstream widget
Expand Down
4 changes: 3 additions & 1 deletion www/tablet/lib/jquery.circlemenu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;(function($, window, document, undefined){
;(function($, window, document, undefined){
var pluginName = 'circleMenu',
defaults = {
depth: 0,
Expand Down Expand Up @@ -38,6 +38,7 @@
var self = this,
directions = {
'vertical':[-400,0],
'vertical-top':[-800,0],
'horizontal':[400,0],
'bottom-left':[180,90],
'bottom':[135,45],
Expand Down Expand Up @@ -79,6 +80,7 @@
// linear hack
if (self.options.angle.start<-360) {x = 0; y = index * self.options.circle_radius +self.options.circle_radius;}
if (self.options.angle.start>360) {x = index * self.options.circle_radius + self.options.circle_radius;y = 0;}
if (self.options.angle.start<-790) {x = 0; y = -(index * self.options.circle_radius +self.options.circle_radius);} //vertical-top

$item.data('plugin_'+pluginName+'-pos-x', x);
$item.data('plugin_'+pluginName+'-pos-y', y);
Expand Down

0 comments on commit 69bce57

Please sign in to comment.