/** * Roundcube splitter GUI class * * @licstart The following is the entire license notice for the * JavaScript code in this file. * * Copyright (c) 2006-2014, 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(b){function e(c){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,f).on("mouseup."+a.id,g);$("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 f(c){if(!a.drag_active)return!1;window.clearTimeout(a.ts);a.ts=window.setTimeout(function(){var d=rcube_event.get_mouse_pos(c);if(a.relative){var b=$(a.p1.parentNode).offset();d.x-=b.left;d.y-=b.top}a.horizontal?d.y-1.5*a.layer.height>a.p1pos.top&&d.y+1.5*a.layer.heighta.p1pos.left&&d.x+1.5*a.layer.width