From be54fa50815eda5d88491343a6de9a67f5a7d6c2 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 29 Oct 2024 16:43:39 +0000 Subject: [PATCH] Documentation Signed-off-by: Jitendra Gundaniya --- README.npm.md | 5 +++++ src/components/app/app.js | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/README.npm.md b/README.npm.md index f4632b88de..0ef5efe0ff 100644 --- a/README.npm.md +++ b/README.npm.md @@ -140,6 +140,9 @@ The example below demonstrates how to configure your kedro-viz using different ` tag: { enabled: {companies: true} }, + modeOptions: { + reFocus: true, + }, theme: "dark" }} /> @@ -161,6 +164,8 @@ The example below demonstrates how to configure your kedro-viz using different ` | `sidebar` | boolean | true | Show/Hide Sidebar and action toolbar | | `zoomToolbar` | boolean | true | Show/Hide zoom-in, zoom-out and zoom reset buttons together | | options.expandAllPipelines | boolean | false | Expand/Collapse Modular pipelines on first load | +| options.modeOptions | | | | +| `reFocus` | boolean | true | Enable/Disable node re-focus on click | options.nodeType | `{disabled: {parameters: boolean,task: boolean,data: boolean}}` | `{disabled: {parameters: true,task: false,data: false}}` | Configuration for node type options | | options.tag | `{enabled: {: boolean}}` | - | Configuration for tag options | | options.theme | string | dark | select `Kedro-Viz` theme : dark/light | diff --git a/src/components/app/app.js b/src/components/app/app.js index 340dc1e44e..108eb80de0 100644 --- a/src/components/app/app.js +++ b/src/components/app/app.js @@ -119,6 +119,12 @@ App.propTypes = { tag: PropTypes.shape({ enabled: PropTypes.objectOf(PropTypes.bool), }), + /** + * Whether to re-focus the graph when a node is clicked + */ + modeOptions: PropTypes.shape({ + reFocus: PropTypes.bool, + }), /** * Override the default enabled/disabled node types */