UNPKG

tu-view-plus

Version:
2 lines (1 loc) 422 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t,o,l,b,f){let i=l,h=b;return l&&(t.width>o.width?i=0:(o.left>t.left&&(i-=Math.abs(t.left-o.left)/f),o.right<t.right&&(i+=Math.abs(t.right-o.right)/f))),b&&(t.height>o.height?h=0:(o.top>t.top&&(h-=Math.abs(t.top-o.top)/f),o.bottom<t.bottom&&(h+=Math.abs(t.bottom-o.bottom)/f))),[i,h]}exports.default=u;