mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
에디터 컴포넌트들이 한 줄로 표시되도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7965 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
996d752424
commit
a846bbf44b
3 changed files with 35 additions and 2 deletions
|
|
@ -100,6 +100,10 @@ Xeed = xe.createApp('Xeed', {
|
|||
this.$toolbar
|
||||
.delegate('li.ti>button', 'mouseover', function(){ $(this[_pn_]).addClass('hover') })
|
||||
.delegate('li.ti>button', 'mouseout', function(){ $(this[_pn_]).removeClass('hover') });
|
||||
|
||||
// window resize
|
||||
$(window).resize(bind(this,this._onresize)).load(bind(this,this._onresize));
|
||||
this.$toolbar.find('button.mo').click(function(){ $(this).nextAll('ul._overflow').toggle(); });
|
||||
|
||||
// register plugins
|
||||
this.registerPlugin(new Hotkey); // Hotkey must be the first
|
||||
|
|
@ -219,6 +223,28 @@ Xeed = xe.createApp('Xeed', {
|
|||
replaceHTML : function(html){ self.cast('PASTE_HTML', [html]) }
|
||||
};
|
||||
},
|
||||
|
||||
_onresize : function() {
|
||||
var $tb = this.$toolbar, $t1 = $tb.find('>.t1'), $t2 = $tb.find('>.t2'), $t1_mo, $t2_mo, base_top;
|
||||
|
||||
base_top = $t1.find('>ul').removeClass('_overflow').show().get(0).offsetTop;
|
||||
$t1_mo = $t1.find('>button.mo').hide();
|
||||
$.each($t1.find('>ul').get().reverse(), function(){
|
||||
if (this.offsetTop > base_top) {
|
||||
$(this).addClass('_overflow').hide();
|
||||
$t1_mo.show();
|
||||
}
|
||||
});
|
||||
|
||||
base_top = $t2.find('>ul').removeClass('_overflow').show().get(0).offsetTop;
|
||||
$t2_mo = $t2.find('>button.mo').hide();
|
||||
$.each($t2.find('>ul').get().reverse(), function(){
|
||||
if (this.offsetTop > base_top) {
|
||||
$(this).addClass('_overflow').hide();
|
||||
$t2_mo.show();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @brief Get an HTML code of the content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue