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

victory-zoom-container

Package Overview
Dependencies
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-zoom-container - npm Package Compare versions

Comparing version 31.0.0 to 31.0.1

24

es/zoom-helpers.js

@@ -218,4 +218,18 @@ import _defaults from "lodash/defaults";

horizontal = props.horizontal;
var x = horizontal ? "y" : "x";
var y = horizontal ? "x" : "y";
var xAxis = "x";
var yAxis = "y";
var zoomAxis = zoomDimension;
if (horizontal) {
xAxis = "y";
yAxis = "x";
if (zoomDimension) {
zoomAxis = {
x: xAxis,
y: yAxis
}[zoomDimension];
}
}
var childComponents = Children.toArray(children);

@@ -225,5 +239,5 @@ var childrenDomain = {};

if (childComponents.length) {
childrenDomain = zoomDimension ? _defineProperty({}, zoomDimension, Wrapper.getDomainFromChildren(props, zoomDimension, childComponents)) : {
x: Wrapper.getDomainFromChildren(props, x, childComponents),
y: Wrapper.getDomainFromChildren(props, y, childComponents)
childrenDomain = zoomDimension ? _defineProperty({}, zoomDimension, Wrapper.getDomainFromChildren(props, zoomAxis, childComponents)) : {
x: Wrapper.getDomainFromChildren(props, xAxis, childComponents),
y: Wrapper.getDomainFromChildren(props, yAxis, childComponents)
};

@@ -230,0 +244,0 @@ }

@@ -230,5 +230,18 @@ "use strict";

horizontal = props.horizontal;
var x = horizontal ? "y" : "x";
var y = horizontal ? "x" : "y";
var xAxis = "x";
var yAxis = "y";
var zoomAxis = zoomDimension;
if (horizontal) {
xAxis = "y";
yAxis = "x";
if (zoomDimension) {
zoomAxis = {
x: xAxis,
y: yAxis
}[zoomDimension];
}
}
var childComponents = _react.Children.toArray(children);

@@ -239,5 +252,5 @@

if (childComponents.length) {
childrenDomain = zoomDimension ? _defineProperty({}, zoomDimension, _victoryCore.Wrapper.getDomainFromChildren(props, zoomDimension, childComponents)) : {
x: _victoryCore.Wrapper.getDomainFromChildren(props, x, childComponents),
y: _victoryCore.Wrapper.getDomainFromChildren(props, y, childComponents)
childrenDomain = zoomDimension ? _defineProperty({}, zoomDimension, _victoryCore.Wrapper.getDomainFromChildren(props, zoomAxis, childComponents)) : {
x: _victoryCore.Wrapper.getDomainFromChildren(props, xAxis, childComponents),
y: _victoryCore.Wrapper.getDomainFromChildren(props, yAxis, childComponents)
};

@@ -244,0 +257,0 @@ }

{
"name": "victory-zoom-container",
"version": "31.0.0",
"version": "31.0.1",
"description": "Interactive Zoom Component for Victory",

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

@@ -161,4 +161,12 @@ /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 1000] }]*/

const { originalDomain, domain, children, zoomDimension, horizontal } = props;
const x = horizontal ? "y" : "x";
const y = horizontal ? "x" : "y";
let xAxis = "x";
let yAxis = "y";
let zoomAxis = zoomDimension;
if (horizontal) {
xAxis = "y";
yAxis = "x";
if (zoomDimension) {
zoomAxis = { x: xAxis, y: yAxis }[zoomDimension];
}
}
const childComponents = Children.toArray(children);

@@ -168,7 +176,7 @@ let childrenDomain = {};

childrenDomain = zoomDimension ?
{ [zoomDimension]: Wrapper.getDomainFromChildren(props, zoomDimension, childComponents) }
: ({
x: Wrapper.getDomainFromChildren(props, x, childComponents),
y: Wrapper.getDomainFromChildren(props, y, childComponents)
});
{ [zoomDimension]: Wrapper.getDomainFromChildren(props, zoomAxis, childComponents) }
: ({
x: Wrapper.getDomainFromChildren(props, xAxis, childComponents),
y: Wrapper.getDomainFromChildren(props, yAxis, childComponents)
});
}

@@ -175,0 +183,0 @@ return defaults({}, childrenDomain, originalDomain, domain);

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

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

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