Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@livelybone/scroll-get

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livelybone/scroll-get - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

18

lib/es/index.js

@@ -0,1 +1,9 @@

/**
* Bundle of @livelybone/scroll-get
* Generated: 2018-12-25
* Version: 3.2.0
* License: MIT
* Author: livelybone(2631541504@qq.com)
*/
function getRect(el) {

@@ -16,12 +24,6 @@ return el.getBoundingClientRect()

function posRelativeToClient(el) {
var o = { clientLeft: 0, clientTop: 0 };
while (el) {
var rect = getRect(el);
o.clientLeft += rect.left;
o.clientTop += rect.top;
el = el.offsetParent;
}
return o
var rect = getRect(el);
return { clientLeft: rect.left, clientTop: rect.top }
}
export { getRect, posRelativeToPage, posRelativeToClient };

@@ -1,1 +0,9 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ScrollGet={})}(this,function(e){"use strict";function n(e){return e.getBoundingClientRect()}e.getRect=n,e.posRelativeToPage=function(e){for(var t={pageLeft:0,pageTop:0};e;)t.pageLeft+=e.offsetLeft,t.pageTop+=e.offsetTop,e=e.offsetParent;return t},e.posRelativeToClient=function(e){for(var t={clientLeft:0,clientTop:0};e;){var o=n(e);t.clientLeft+=o.left,t.clientTop+=o.top,e=e.offsetParent}return t},Object.defineProperty(e,"__esModule",{value:!0})});
/**
* Bundle of @livelybone/scroll-get
* Generated: 2018-12-25
* Version: 3.2.0
* License: MIT
* Author: livelybone(2631541504@qq.com)
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ScrollGet={})}(this,function(e){"use strict";function o(e){return e.getBoundingClientRect()}e.getRect=o,e.posRelativeToPage=function(e){for(var t={pageLeft:0,pageTop:0};e;)t.pageLeft+=e.offsetLeft,t.pageTop+=e.offsetTop,e=e.offsetParent;return t},e.posRelativeToClient=function(e){var t=o(e);return{clientLeft:t.left,clientTop:t.top}},Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "@livelybone/scroll-get",
"version": "3.1.0",
"version": "3.2.0",
"description": "A module for get left/top distance to client or page of element",

@@ -34,4 +34,5 @@ "main": "./lib/umd/index.js",

"rollup": "^0.65.1",
"rollup-plugin-license": "^0.7.0",
"rollup-plugin-uglify": "^5.0.2"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc