Socket
Socket
Sign inDemoInstall

@juggle/resize-observer

Package Overview
Dependencies
0
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.0 to 0.10.1

22

lib/algorithms/calculateBoxSize.js

@@ -14,4 +14,6 @@ import { ResizeObserverBoxOptions } from '../ResizeObserverBoxOptions';

const cs = getComputedStyle(target);
const hidden = cs.display === 'none';
const removePadding = !IE && cs.boxSizing === 'border-box';
const width = parseDimension(cs.width);
const height = parseDimension(cs.height);
const hidden = isNaN(width) || isNaN(height) || cs.display === 'none';
const paddingTop = svg || hidden ? 0 : parseDimension(cs.paddingTop);

@@ -31,15 +33,15 @@ const paddingRight = svg || hidden ? 0 : parseDimension(cs.paddingRight);

const heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
const width = hidden ? 0 : svg ? svg.width : parseDimension(cs.width) - widthReduction;
const height = hidden ? 0 : svg ? svg.height : parseDimension(cs.height) - heightReduction;
const contentWidth = hidden ? 0 : svg ? svg.width : parseDimension(cs.width) - widthReduction;
const contentHeight = hidden ? 0 : svg ? svg.height : parseDimension(cs.height) - heightReduction;
const borderBoxSize = {
inlineSize: width + horizontalPadding + horizontalBorderArea,
blockSize: height + verticalPadding + verticalBorderArea
inlineSize: contentWidth + horizontalPadding + horizontalBorderArea,
blockSize: contentHeight + verticalPadding + verticalBorderArea
};
const contentBoxSize = {
inlineSize: width,
blockSize: height
inlineSize: contentWidth,
blockSize: contentHeight
};
const scrollBoxSize = {
inlineSize: width + horizontalPadding,
blockSize: height + verticalPadding
inlineSize: contentWidth + horizontalPadding,
blockSize: contentHeight + verticalPadding
};

@@ -50,3 +52,3 @@ const devicePixelBorderBoxSize = {

};
const contentRect = new DOMRectReadOnly(paddingLeft, paddingTop, width, height);
const contentRect = new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight);
const boxes = {

@@ -53,0 +55,0 @@ borderBoxSize,

{
"name": "@juggle/resize-observer",
"version": "0.10.0",
"version": "0.10.1",
"description": "ResizeObserver - Based on the official draft specification",

@@ -5,0 +5,0 @@ "main": "./lib/ResizeObserver.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc