Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const TopologyControlBar: React.FC = ({ graphApi }) => {
const controlButtons = createTopologyControlButtons({
...defaultControlButtonsOptions,
zoomInCallback: () => {
graphApi && graphApi.zoomIn();
},
zoomOutCallback: () => {
graphApi && graphApi.zoomOut();
},
fitToScreenCallback: () => {
graphApi && graphApi.zoomFit();
},
resetViewCallback: () => {
graphApi && graphApi.resetLayout();
},
legend: false,
});
render() {
const controlButtons = createTopologyControlButtons({
zoomInCallback: this.zoomInCallback,
zoomOutCallback: this.zoomOutCallback,
resetViewCallback: this.resetViewCallback,
fitToScreenHidden: true,
legendCallback: this.handleLegendClick,
legendAriaLabel: "topology-legend"
});
return (