clone menu items before extending them
This commit is contained in:
parent
9dbedf13f9
commit
36a5f5a95f
1 changed files with 1 additions and 2 deletions
|
@ -16,7 +16,6 @@ Ox.Menu <f> Menu Object
|
||||||
side <s> open to 'bottom' or 'right'
|
side <s> open to 'bottom' or 'right'
|
||||||
size <s> 'large', 'medium' or 'small'
|
size <s> 'large', 'medium' or 'small'
|
||||||
self <o> shared private variable
|
self <o> shared private variable
|
||||||
|
|
||||||
change_groupId <!> {id, value} checked item of a group has changed
|
change_groupId <!> {id, value} checked item of a group has changed
|
||||||
click_itemId <!> item not belonging to a group was clicked
|
click_itemId <!> item not belonging to a group was clicked
|
||||||
click_menuId <!> {id, value} item not belonging to a group was clicked
|
click_menuId <!> {id, value} item not belonging to a group was clicked
|
||||||
|
@ -316,7 +315,7 @@ Ox.Menu = function(options, self) {
|
||||||
var position;
|
var position;
|
||||||
if ('id' in item) {
|
if ('id' in item) {
|
||||||
that.items.push(
|
that.items.push(
|
||||||
Ox.MenuItem(Ox.extend(item, {
|
Ox.MenuItem(Ox.extend(Ox.clone(item), {
|
||||||
maxWidth: self.options.maxWidth,
|
maxWidth: self.options.maxWidth,
|
||||||
menu: that,
|
menu: that,
|
||||||
position: position = that.items.length
|
position: position = that.items.length
|
||||||
|
|
Loading…
Reference in a new issue