PHP Classes

File: engine/modules/contrib/foundation/js/plugins/foundation.util.box.min.js

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/contrib/foundation/js/plugins/foundation.util.box.min.js   Download  
File: engine/modules/contrib/foundation/js/plugins/foundation.util.box.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 2,355 bytes
 

Contents

Class file image Download
"use strict";!function(t){function e(t,e,o,i){var s,h,n,w,d=f(t);if(e){var r=f(e);h=d.offset.top+d.height<=r.height+r.offset.top,s=d.offset.top>=r.offset.top,n=d.offset.left>=r.offset.left,w=d.offset.left+d.width<=r.width+r.offset.left}else h=d.offset.top+d.height<=d.windowDims.height+d.windowDims.offset.top,s=d.offset.top>=d.windowDims.offset.top,n=d.offset.left>=d.windowDims.offset.left,w=d.offset.left+d.width<=d.windowDims.width;var l=[h,s,n,w];return o?n===w==!0:i?s===h==!0:l.indexOf(!1)===-1}function f(t,e){if(t=t.length?t[0]:t,t===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var f=t.getBoundingClientRect(),o=t.parentNode.getBoundingClientRect(),i=document.body.getBoundingClientRect(),s=window.pageYOffset,h=window.pageXOffset;return{width:f.width,height:f.height,offset:{top:f.top+s,left:f.left+h},parentDims:{width:o.width,height:o.height,offset:{top:o.top+s,left:o.left+h}},windowDims:{width:i.width,height:i.height,offset:{top:s,left:h}}}}function o(t,e,o,i,s,h){var n=f(t),w=e?f(e):null;switch(o){case"top":return{left:Foundation.rtl()?w.offset.left-n.width+w.width:w.offset.left,top:w.offset.top-(n.height+i)};case"left":return{left:w.offset.left-(n.width+s),top:w.offset.top};case"right":return{left:w.offset.left+w.width+s,top:w.offset.top};case"center top":return{left:w.offset.left+w.width/2-n.width/2,top:w.offset.top-(n.height+i)};case"center bottom":return{left:h?s:w.offset.left+w.width/2-n.width/2,top:w.offset.top+w.height+i};case"center left":return{left:w.offset.left-(n.width+s),top:w.offset.top+w.height/2-n.height/2};case"center right":return{left:w.offset.left+w.width+s+1,top:w.offset.top+w.height/2-n.height/2};case"center":return{left:n.windowDims.offset.left+n.windowDims.width/2-n.width/2,top:n.windowDims.offset.top+n.windowDims.height/2-n.height/2};case"reveal":return{left:(n.windowDims.width-n.width)/2,top:n.windowDims.offset.top+i};case"reveal full":return{left:n.windowDims.offset.left,top:n.windowDims.offset.top};case"left bottom":return{left:w.offset.left,top:w.offset.top+w.height+i};case"right bottom":return{left:w.offset.left+w.width+s-n.width,top:w.offset.top+w.height+i};default:return{left:Foundation.rtl()?w.offset.left-n.width+w.width:w.offset.left+s,top:w.offset.top+w.height+i}}}Foundation.Box={ImNotTouchingYou:e,GetDimensions:f,GetOffsets:o}}(jQuery);