forked from 0x2620/oxjs
allow for max width in menus
This commit is contained in:
parent
4bb3196c03
commit
16556c0604
4 changed files with 11 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ Ox.Menu = function(options, self) {
|
|||
id: '',
|
||||
items: [],
|
||||
mainmenu: null,
|
||||
maxWidth: 0,
|
||||
offset: {
|
||||
left: 0,
|
||||
top: 0
|
||||
|
|
@ -198,6 +199,7 @@ Ox.Menu = function(options, self) {
|
|||
var position;
|
||||
if ('id' in item) {
|
||||
that.items.push(Ox.MenuItem(Ox.extend(item, {
|
||||
maxWidth: self.options.maxWidth,
|
||||
menu: that,
|
||||
position: position = that.items.length
|
||||
})).data('position', position).appendTo(that.$content)); // fixme: jquery bug when passing {position: position}? does not return the object?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue