toolshed-8.x-1.x-dev/js/geom.min.js

js/geom.min.js
"use strict";(({Toolshed:o})=>{o.Geom={};class t{static get TOP(){return 1}static get BOTTOM(){return 2}static get LEFT(){return 16}static get RIGHT(){return 32}}o.Geom.Edges=t,o.Geom.Direction=class e{static get VERTICAL(){return t.TOP|t.BOTTOM}static get HORIZONTAL(){return t.LEFT|t.RIGHT}static get ANY(){return e.HORIZONTAL|e.VERTICAL}},o.Geom.Rect=class r{static fromElement(t){return t=t.getBoundingClientRect(),new r(t.left,t.top,t.right,t.bottom)}constructor(t,e,i,s){t instanceof o.Geom.Rect?Object.assign(this,t):(e<=s?(this.top=e,this.bottom=s):(this.top=s,this.bottom=e),t<=i?(this.left=t,this.right=i):(this.left=i,this.right=t))}getPosition(){return{left:this.left,top:this.top}}getWidth(){return this.right-this.left}getHeight(){return this.bottom-this.top}isInRect(t){var e=this.getPosition();return t.left-=e.left,t.top-=e.top,0<=t.left&&t.left<=this.getWidth()&&0<=t.top&&t.top<=this.getHeight()}getArea(){return this.getWidth()*this.getHeight()}offset(t,e){this.top+=e,this.bottom+=e,this.left+=t,this.right+=t}getIntersection(t){var e=t.getPosition(),i=this.getPosition(),s=Math.max(e.left,i.left),o=Math.max(e.top,i.top),h=Math.min(e.left+t.getWidth(),i.left+this.getWidth()),e=Math.min(e.top+t.getHeight(),i.top+this.getHeight());return h<s||e<o?null:new r(s,o,h,e)}contains(t){return t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom}}})(Drupal);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc