mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix window size not fitting editor when sending message
This commit is contained in:
parent
0707059d49
commit
1cfb83da4d
2 changed files with 9 additions and 7 deletions
|
|
@ -511,17 +511,17 @@ function setFixedPopupSize() {
|
|||
|
||||
if(w < 800) w = 800 + offset.left*2;
|
||||
|
||||
|
||||
dw = $win.width();
|
||||
dh = $win.height();
|
||||
|
||||
// Window 의 너비나 높이는 스크린의 너비나 높이보다 클 수 없다. 스크린의 너비나 높이와 내용의 너비나 높이를 비교해서 최소값을 이용한다.
|
||||
if(Math.min(w, window.screen.availWidth) != dw) window.resizeBy(Math.min(w, window.screen.availWidth) - dw, 0);
|
||||
if(Math.min(h, window.screen.availHeight-100) != dh) window.resizeBy(0, Math.min(h, window.screen.availHeight-100) - dh);
|
||||
w = Math.min(w, window.screen.availWidth);
|
||||
h = Math.min(h, window.screen.availHeight - 100);
|
||||
window.resizeBy(w - dw, h - dh);
|
||||
|
||||
$pc.width(Math.min(w, window.screen.availWidth)-offset.left*2).css({overflow:'',height:''});
|
||||
if(Math.min(h, window.screen.availHeight-100) === window.screen.availHeight-100) {
|
||||
$pc.width(Math.min(w, window.screen.availWidth)-offset.left*2-scbw).css({overflow:'',height:''});
|
||||
$pc.width(w - offset.left*2).css({overflow:'',height:''});
|
||||
if(h === window.screen.availHeight - 100) {
|
||||
$pc.width(w - offset.left*2-scbw).css({overflow:'',height:''});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
{$content}
|
||||
</div>
|
||||
<script>
|
||||
jQuery(window).load(setFixedPopupSize);
|
||||
jQuery(function() {
|
||||
setTimeout(setFixedPopupSize, 500);
|
||||
});
|
||||
var _isPoped = true;
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue