| 39 | | // Align this menu over 'element' with enough padding to fly out |
|---|
| 40 | | var align_position = (position == 'r') ? 'tl-tl' : 'tr-tr'; |
|---|
| 41 | | this.el.alignTo(this.alignEl, align_position); |
|---|
| 42 | | var padding_position = (position == 'r') ? 'padding-left' : 'padding-right'; |
|---|
| 43 | | this.el.setStyle(padding_position, this.alignEl.getWidth() + 'px'); |
|---|
| 44 | | |
|---|
| 45 | | // Set z-index of menu and element so the menu appears behind 'element' |
|---|
| 46 | | this.alignEl.setStyle('z-index', '15000'); |
|---|
| 47 | | this.el.setStyle('z-index', '14999'); |
|---|
| | 40 | // Size and Align the menu as appropriate |
|---|
| | 41 | this.resize(); |
|---|
| | 50 | }, |
|---|
| | 51 | // Resize and realign the menu to the last tree node to have been |
|---|
| | 52 | // passed into the 'show' method. |
|---|
| | 53 | resize: function() { |
|---|
| | 54 | // Align this menu over 'element' with enough padding to fly out |
|---|
| | 55 | var align_position = (this.position == 'r') ? 'tl-tl' : 'tr-tr'; |
|---|
| | 56 | this.el.alignTo(this.alignEl, align_position); |
|---|
| | 57 | var padding_position = (this.position == 'r') ? 'padding-left' : 'padding-right'; |
|---|
| | 58 | this.el.setStyle(padding_position, this.alignEl.getWidth() + 'px'); |
|---|
| | 59 | |
|---|
| | 60 | // Set z-index of menu and element so the menu appears behind 'element' |
|---|
| | 61 | this.alignEl.setStyle('z-index', '15000'); |
|---|
| | 62 | this.el.setStyle('z-index', '14999'); |
|---|