/** * Roundcube splitter GUI class * * @licstart The following is the entire license notice for the * JavaScript code in this file. * * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * @licend The above is the entire license notice * for the JavaScript code in this file. * * @constructor */ function rcube_splitter(d){function f(b){a.drag_active=!0;if(bw.konq||bw.chrome||bw.safari)document.body.style.webkitUserSelect="none";a.p1pos=a.relative?$(a.p1).position():$(a.p1).offset();a.p2pos=a.relative?$(a.p2).position():$(a.p2).offset();$(document).on("mousemove."+a.id,g).on("mouseup."+a.id,h);$("iframe").each(function(){$('
').css({background:"#fff",width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo("body")})} function g(b){if(!a.drag_active)return!1;window.clearTimeout(a.ts);a.ts=window.setTimeout(function(){var c=rcube_event.get_mouse_pos(b);if(a.relative){var e=$(a.p1.parentNode).offset();c.x-=e.left;c.y-=e.top}a.horizontal?c.y-1.5*a.layer.height>a.p1pos.top&&c.y+1.5*a.layer.height