Socket
Socket
Sign inDemoInstall

react-pannable

Package Overview
Dependencies
9
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.2 to 6.2.3

20

cjs/pad/ListContent.js

@@ -101,2 +101,3 @@ "use strict";

var nextItemHashList = [];
var showsHashList = [];

@@ -155,12 +156,15 @@ function buildItem(attrs) {

nextItemHashList[itemIndex] = hash;
var skipRender = !needsRender && !forceRender;
if (!itemSize && nextItemHashList.indexOf(hash) !== -1) {
skipRender = true;
if (skipRender) {
return null;
}
nextItemHashList[itemIndex] = hash;
if (!itemSize) {
if (showsHashList.indexOf(hash) !== -1) {
return null;
}
if (skipRender) {
return null;
showsHashList.push(hash);
}

@@ -172,3 +176,3 @@

contextValue.onResize = function (itemSize) {
contextValue.onResize = function (size) {
setItemSizeDict(function (itemSizeDict) {

@@ -181,7 +185,7 @@ var _objectSpread2;

if ((0, _geometry.isEqualToSize)(itemSizeDict[hash], itemSize)) {
if ((0, _geometry.isEqualToSize)(itemSizeDict[hash], size)) {
return itemSizeDict;
}
return _objectSpread(_objectSpread({}, itemSizeDict), {}, (_objectSpread2 = {}, _objectSpread2[hash] = itemSize, _objectSpread2));
return _objectSpread(_objectSpread({}, itemSizeDict), {}, (_objectSpread2 = {}, _objectSpread2[hash] = size, _objectSpread2));
});

@@ -188,0 +192,0 @@ };

@@ -81,2 +81,3 @@ var _excluded = ["itemCount", "renderItem", "direction", "width", "height", "spacing", "estimatedItemWidth", "estimatedItemHeight", "render", "children"];

var nextItemHashList = [];
var showsHashList = [];

@@ -135,12 +136,15 @@ function buildItem(attrs) {

nextItemHashList[itemIndex] = hash;
var skipRender = !needsRender && !forceRender;
if (!itemSize && nextItemHashList.indexOf(hash) !== -1) {
skipRender = true;
if (skipRender) {
return null;
}
nextItemHashList[itemIndex] = hash;
if (!itemSize) {
if (showsHashList.indexOf(hash) !== -1) {
return null;
}
if (skipRender) {
return null;
showsHashList.push(hash);
}

@@ -152,3 +156,3 @@

contextValue.onResize = function (itemSize) {
contextValue.onResize = function (size) {
setItemSizeDict(function (itemSizeDict) {

@@ -161,7 +165,7 @@ var _objectSpread2;

if (isEqualToSize(itemSizeDict[hash], itemSize)) {
if (isEqualToSize(itemSizeDict[hash], size)) {
return itemSizeDict;
}
return _objectSpread(_objectSpread({}, itemSizeDict), {}, (_objectSpread2 = {}, _objectSpread2[hash] = itemSize, _objectSpread2));
return _objectSpread(_objectSpread({}, itemSizeDict), {}, (_objectSpread2 = {}, _objectSpread2[hash] = size, _objectSpread2));
});

@@ -168,0 +172,0 @@ };

18

lib/pad/ListContent.js

@@ -50,2 +50,3 @@ import PadContext from './PadContext';

const nextItemHashList = [];
const showsHashList = [];
function buildItem(attrs) {

@@ -86,13 +87,16 @@ const { rect, itemIndex, itemSize, visibleRect, needsRender, Item } = attrs;

}
nextItemHashList[itemIndex] = hash;
let skipRender = !needsRender && !forceRender;
if (!itemSize && nextItemHashList.indexOf(hash) !== -1) {
skipRender = true;
}
nextItemHashList[itemIndex] = hash;
if (skipRender) {
return null;
}
if (!itemSize) {
if (showsHashList.indexOf(hash) !== -1) {
return null;
}
showsHashList.push(hash);
}
const contextValue = { ...context };
contextValue.visibleRect = visibleRect;
contextValue.onResize = (itemSize) => {
contextValue.onResize = (size) => {
setItemSizeDict((itemSizeDict) => {

@@ -102,6 +106,6 @@ if (!hash) {

}
if (isEqualToSize(itemSizeDict[hash], itemSize)) {
if (isEqualToSize(itemSizeDict[hash], size)) {
return itemSizeDict;
}
return { ...itemSizeDict, [hash]: itemSize };
return { ...itemSizeDict, [hash]: size };
});

@@ -108,0 +112,0 @@ };

{
"name": "react-pannable",
"version": "6.2.2",
"version": "6.2.3",
"description": "Flexible and Customizable Layouts for Scrolling Content with React",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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