Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

toggle controls

Aykut Saraç706075edfd70
diff --git a/src/containers/LiveEditor/index.tsx b/src/containers/LiveEditor/index.tsx
index 89544703..077ec6ab 100644
--- a/src/containers/LiveEditor/index.tsx
+++ b/src/containers/LiveEditor/index.tsx
@@ -117,20 +117,22 @@ export const LiveEditor: React.FC = () => {
</TransformComponent>
</TransformWrapper>
</StyledEditorWrapper>
- <StyledControls>
- <Button onClick={() => zoomIn(0.8)}>
- <AiOutlineZoomIn size={20} />
- </Button>
- <Button onClick={() => zoomOut(0.4)}>
- <AiOutlineZoomOut size={20} />
- </Button>
- <Button onClick={() => wrapperRef.current?.resetTransform()}>
- <AiOutlineFullscreen size={20} />
- </Button>
- <Button>
- <AiFillSave size={20} />
- </Button>
- </StyledControls>
+ {config.controls && (
+ <StyledControls>
+ <Button onClick={() => zoomIn(0.8)}>
+ <AiOutlineZoomIn size={20} />
+ </Button>
+ <Button onClick={() => zoomOut(0.4)}>
+ <AiOutlineZoomOut size={20} />
+ </Button>
+ <Button onClick={() => wrapperRef.current?.resetTransform()}>
+ <AiOutlineFullscreen size={20} />
+ </Button>
+ <Button>
+ <AiFillSave size={20} />
+ </Button>
+ </StyledControls>
+ )}
</StyledLiveEditor>
);
};