@ajuhos/react-flow-chart
Advanced tools
Comparing version 0.0.55 to 0.0.56
{ | ||
"name": "@ajuhos/react-flow-chart", | ||
"version": "0.0.55", | ||
"version": "0.0.56", | ||
"description": "A flexible, stateless flow chart library for react.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -26,3 +26,3 @@ "use strict"; | ||
var portCallbacks = { onPortPositionChange: onPortPositionChange, onLinkStart: onLinkStart, onLinkMove: onLinkMove, onLinkComplete: onLinkComplete, onLinkCancel: onLinkCancel }; | ||
var nodesInView = Object.keys(nodes).filter(function (nodeId) { | ||
var nodesInView = config.renderInViewOnly ? Object.keys(nodes).filter(function (nodeId) { | ||
var defaultNodeSize = { width: 500, height: 500 }; | ||
@@ -36,5 +36,5 @@ var _a = nodes[nodeId].position, x = _a.x, y = _a.y; | ||
return !(isTooFarLeft || isTooFarRight || isTooFarUp || isTooFarDown); | ||
}); | ||
}) : Object.keys(nodes); | ||
var matrix = config.smartRouting ? grid_1.getMatrix(chart.offset, Object.values(nodesInView.map(function (nodeId) { return nodes[nodeId]; }))) : undefined; | ||
var linksInView = Object.keys(links).filter(function (linkId) { | ||
var linksInView = config.renderInViewOnly ? Object.keys(links).filter(function (linkId) { | ||
var from = links[linkId].from; | ||
@@ -45,3 +45,3 @@ var to = links[linkId].to; | ||
nodesInView.indexOf(to.nodeId) !== -1); | ||
}); | ||
}) : Object.keys(links); | ||
return (React.createElement(__1.CanvasWrapper, __assign({ config: config, position: chart.offset, scale: chart.scale, ComponentInner: CanvasInner, ComponentOuter: CanvasOuter, onSizeChange: function (width, height) { return setCanvasSize({ width: width, height: height }); } }, canvasCallbacks), | ||
@@ -48,0 +48,0 @@ linksInView.map(function (linkId) { |
@@ -8,2 +8,3 @@ import { IChart } from './chart'; | ||
showArrowHead?: boolean; | ||
renderInViewOnly?: boolean; | ||
gridSize?: number; | ||
@@ -10,0 +11,0 @@ validateLink?: (props: IOnLinkCompleteInput & { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188156
2778