fix resize problem when iframe is inside of window

This commit is contained in:
lxsang 2021-04-01 19:06:59 +02:00
parent ac76a5f967
commit d670bd3b3a
3 changed files with 16 additions and 0 deletions

Binary file not shown.

View File

@ -405,6 +405,7 @@ namespace OS {
const mouse_move_hdl = (e) => { const mouse_move_hdl = (e) => {
let w = $(this).width(); let w = $(this).width();
let h = $(this).height(); let h = $(this).height();
$(this.refs.win_overlay).show();
if(target != this.refs.grip_bottom) if(target != this.refs.grip_bottom)
{ {
w += e.clientX - offset.left; w += e.clientX - offset.left;
@ -421,6 +422,7 @@ namespace OS {
this.setsize({ w, h }); this.setsize({ w, h });
} }
const mouse_up_hdl = (e) => { const mouse_up_hdl = (e) => {
$(this.refs.win_overlay).hide();
$(window).off("mousemove", mouse_move_hdl); $(window).off("mousemove", mouse_move_hdl);
return $(window).off("mouseup", mouse_up_hdl); return $(window).off("mouseup", mouse_up_hdl);
} }
@ -553,6 +555,11 @@ namespace OS {
ref: "grip_right", ref: "grip_right",
class: "afx-window-grip-right", class: "afx-window-grip-right",
}, },
{
el: "div",
ref: "win_overlay",
class: "afx-window-overlay",
},
], ],
}, },
]; ];

View File

@ -61,4 +61,13 @@ afx-app-window div.afx-window-grip-right{
top: 0; top: 0;
cursor: ew-resize; cursor: ew-resize;
background-color: transparent; background-color: transparent;
}
afx-app-window div.afx-window-overlay {
background-color: transparent;
display: none;
position: absolute;
top: 0;
left: 0;
bottom: 5px;
right: 5px;
} }