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.8.12 to 2.8.13

23

dist/Cell.js

@@ -25,2 +25,14 @@ "use strict";

const react_konva_1 = require("react-konva");
var Align;
(function (Align) {
Align["LEFT"] = "left";
Align["RIGHT"] = "right";
Align["CENTER"] = "center";
})(Align || (Align = {}));
const getX = (align, width = 0, padding = 0) => {
if (align === Align.CENTER)
return width / 2;
if (align === Align.LEFT)
return padding;
};
/**

@@ -35,9 +47,6 @@ * Default cell component

value !== void 0 ? (react_1.default.createElement(react_konva_1.Shape, { strokeWidth: 0, hitStrokeWidth: 0, perfectDrawEnabled: false, shadowForStrokeEnabled: false, x: x, y: y, height: height, width: width, sceneFunc: (context) => {
// @ts-ignore
context.font = `${fontSize}px ${fontFamily}`;
// @ts-ignore
context.fillStyle = textColor;
const lineTranslateX = align === "center" ? (width || 0) / 2 : padding;
// @ts-ignore
context.textAlign = align;
context._context.font = `${fontSize}px ${fontFamily}`;
context._context.fillStyle = textColor;
const lineTranslateX = getX(align, width, padding);
context._context.textAlign = align;
context.fillText(value, lineTranslateX, (height || 0) - padding);

@@ -44,0 +53,0 @@ } })) : null));

{
"name": "react-konva-grid",
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets",
"version": "2.8.12",
"version": "2.8.13",
"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

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