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

react-konva-grid

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-konva-grid - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

40

dist/Grid.js

@@ -272,6 +272,12 @@ "use strict";

/* Draw merged cells */
const mergedCellAreas = react_1.useMemo(() => {
const [mergedCellAreas, frozenColumnMergedCellAreas, frozenRowMergedCellAreas, frozenIntersectionMergedCells,] = react_1.useMemo(() => {
const areas = [];
const frozenColumnAreas = [];
const frozenRowAreas = [];
const frozenIntersectionCells = [];
for (let i = 0; i < mergedCells.length; i++) {
const { top: rowIndex, left: columnIndex, right, bottom } = mergedCells[i];
const isLeftBoundFrozen = columnIndex < frozenColumns;
const isTopBoundFrozen = rowIndex < frozenRows;
const isIntersectionFrozen = rowIndex < frozenRows && columnIndex < frozenColumns;
const x = helpers_1.getColumnOffset({

@@ -301,3 +307,3 @@ index: columnIndex,

}) - y;
areas.push(itemRenderer({
const cellRenderer = itemRenderer({
x,

@@ -310,5 +316,19 @@ y,

key: helpers_1.itemKey({ rowIndex, columnIndex }),
}));
});
if (isLeftBoundFrozen) {
frozenColumnAreas.push(cellRenderer);
}
if (isTopBoundFrozen) {
frozenRowAreas.push(cellRenderer);
}
if (isIntersectionFrozen)
[frozenIntersectionCells.push(cellRenderer)];
areas.push(cellRenderer);
}
return areas;
return [
areas,
frozenColumnAreas,
frozenRowAreas,
frozenIntersectionCells,
];
}, [

@@ -569,7 +589,13 @@ mergedCells,

react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: scrollTop, offsetX: scrollLeft, listening: false }, selectionAreas),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: scrollTop, offsetX: 0 }, frozenColumnCells),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: scrollTop, offsetX: 0 },
frozenColumnCells,
frozenColumnMergedCellAreas),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: scrollTop, offsetX: 0, listening: false }, selectionAreasFrozenColumns),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: scrollLeft }, frozenRowCells),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: scrollLeft },
frozenRowCells,
frozenRowMergedCellAreas),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: scrollLeft, listening: false }, selectionAreasFrozenRows),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: 0 }, frozenIntersectionCells),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: 0 },
frozenIntersectionCells,
frozenIntersectionMergedCells),
react_1.default.createElement(ReactKonvaCore_1.Group, { offsetY: 0, offsetX: 0, listening: false }, selectionAreasIntersection)))),

@@ -576,0 +602,0 @@ showScrollbar ? (react_1.default.createElement(react_1.default.Fragment, null,

2

package.json
{
"name": "react-konva-grid",
"description": "Canvas grid to render large set of tabular data with virtualization.",
"version": "2.2.0",
"version": "2.2.1",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc