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

clear-ui-base

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clear-ui-base

UI components for React

  • 0.0.1-alpha.44
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

'use strict';

Object.defineProperty(exports, "__esModule", { value: true }); exports.default = readMeasurements;

var _jquery = require('jquery');

var _jquery2 = _interopRequireDefault(_jquery);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var $window = (0, _jquery2.default)(window);

function readElemMeasurements(elem) { return { offset: elem.offset(), width: elem.outerWidth(), height: elem.outerHeight() }; }

function readViewportMeasurements() { return { scrollTop: $window.scrollTop(), scrollLeft: $window.scrollLeft(), height: $window.height(), width: $window.width() }; }

function getViewportBounds(viewport) { return { left: viewport.scrollLeft, right: viewport.scrollLeft + viewport.width, top: viewport.scrollTop, bottom: viewport.scrollTop + viewport.height }; }

function readMeasurements(element, target) { var viewport = readViewportMeasurements(); var bounds = getViewportBounds(viewport); var measurements = { element: readElemMeasurements(element), target: readElemMeasurements(target), viewport: viewport, bounds: bounds }; return measurements; }

Keywords

FAQs

Package last updated on 01 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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