element-measurer
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -10,2 +10,8 @@ # Changelog | ||
## [1.4.2] - 2019-10-17 | ||
### Updated | ||
- Update dependencies. | ||
## [1.4.0] - 2018-08-23 | ||
@@ -12,0 +18,0 @@ |
@@ -1,5 +0,5 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ElementMeasurer=t():e.ElementMeasurer=t()}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/element-measurer.ts")}({"./src/element-measurer.ts": | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ElementMeasurer=t():e.ElementMeasurer=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./src/element-measurer.ts")}({"./src/element-measurer.ts": | ||
/*!*********************************!*\ | ||
!*** ./src/element-measurer.ts ***! | ||
\*********************************/ | ||
/*! exports provided: ElementMeasurer, default */function(e,t,r){"use strict";r.r(t),r.d(t,"ElementMeasurer",function(){return n});var n=function(){function e(e){void 0===e&&(e=document.documentElement),this.setTarget(e)}return Object.defineProperty(e.prototype,"isDocument",{get:function(){return this.target===document.documentElement||this.target===document.body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.isDocument?window.innerWidth:this.getRect().width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.isDocument?window.innerHeight:this.getRect().height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.isDocument?window.pageYOffset:this.target.scrollTop},set:function(e){this.isDocument?window.scrollTo(this.scrollLeft,e):this.target.scrollTop=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.isDocument?window.pageXOffset:this.target.scrollLeft},set:function(e){this.isDocument?window.scrollTo(e,this.scrollTop):this.target.scrollLeft=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollWidth",{get:function(){return this.target.scrollWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.target.scrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollTop",{get:function(){return this.scrollHeight-this.clientHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollLeft",{get:function(){return this.scrollWidth-this.clientWidth},enumerable:!0,configurable:!0}),e.prototype.setTarget=function(e){if(e instanceof HTMLElement||e instanceof Element)this.target=e;else if(e===window||e===document)this.target=document.documentElement;else{if("string"!=typeof e)throw new TypeError("Target value is not correct type.");this.target=document.querySelector(e)}return this},e.prototype.getOffset=function(){for(var e=this.target,t=0,r=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)r+=e.offsetLeft-e.scrollLeft,t+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:t,left:r}},e.prototype.getRect=function(){return this.target.getBoundingClientRect()},e}();t.default=n}})}); | ||
/*! exports provided: ElementMeasurer, default */function(e,t,r){"use strict";r.r(t),r.d(t,"ElementMeasurer",(function(){return n}));var n=function(){function e(e){void 0===e&&(e=document.documentElement),this.setTarget(e)}return Object.defineProperty(e.prototype,"isDocument",{get:function(){return this.target===document.documentElement||this.target===document.body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientWidth",{get:function(){return this.isDocument?window.innerWidth:this.getRect().width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientHeight",{get:function(){return this.isDocument?window.innerHeight:this.getRect().height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.isDocument?window.pageYOffset:this.target.scrollTop},set:function(e){this.isDocument?window.scrollTo(this.scrollLeft,e):this.target.scrollTop=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollLeft",{get:function(){return this.isDocument?window.pageXOffset:this.target.scrollLeft},set:function(e){this.isDocument?window.scrollTo(e,this.scrollTop):this.target.scrollLeft=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollWidth",{get:function(){return this.target.scrollWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.target.scrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollTop",{get:function(){return this.scrollHeight-this.clientHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollLeft",{get:function(){return this.scrollWidth-this.clientWidth},enumerable:!0,configurable:!0}),e.prototype.setTarget=function(e){if(e instanceof HTMLElement||e instanceof Element)this.target=e;else if(e===window||e===document)this.target=document.documentElement;else{if("string"!=typeof e)throw new TypeError("Target value is not correct type.");this.target=document.querySelector(e)}return this},e.prototype.getOffset=function(){for(var e=this.target,t=0,r=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)r+=e.offsetLeft-e.scrollLeft,t+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:t,left:r}},e.prototype.getRect=function(){return this.target.getBoundingClientRect()},e}();t.default=n}})})); |
{ | ||
"name": "element-measurer", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "The javascript library class for measures size of Element.", | ||
@@ -30,18 +30,21 @@ "main": "dist/element-measurer.js", | ||
"devDependencies": { | ||
"@types/chai": "^4.1.4", | ||
"@types/chai-as-promised": "^7.1.0", | ||
"@types/mocha": "^5.2.5", | ||
"@types/puppeteer": "^1.6.0", | ||
"chai": "^4.1.2", | ||
"@types/chai": "^4.2.3", | ||
"@types/chai-as-promised": "^7.1.2", | ||
"@types/mocha": "^5.2.7", | ||
"@types/puppeteer": "^1.20.2", | ||
"@typescript-eslint/eslint-plugin": "^2.4.0", | ||
"@typescript-eslint/parser": "^2.4.0", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"mocha": "^5.2.0", | ||
"puppeteer": "^1.7.0", | ||
"eslint": "^6.5.1", | ||
"mocha": "^6.2.1", | ||
"puppeteer": "^1.20.0", | ||
"source-map-loader": "^0.2.4", | ||
"ts-loader": "^4.5.0", | ||
"typescript": "^3.0.1", | ||
"webpack": "^4.17.1", | ||
"webpack-cli": "^3.1.0", | ||
"webpack-merge": "^4.1.4", | ||
"webpack-notifier": "^1.6.0" | ||
"ts-loader": "^6.2.0", | ||
"typescript": "^3.6.4", | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.9", | ||
"webpack-merge": "^4.2.2", | ||
"webpack-notifier": "^1.8.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
68538
23
971
18