From 4b79efec36061d0e1d9777c2af2a50b85bc41eb3 Mon Sep 17 00:00:00 2001 From: Laura Fuentes Grau Date: Mon, 30 Mar 2020 17:15:26 +0200 Subject: [PATCH] Topology: now adjusted to new React SVG Pan Zoom Version --- src/widget/widgets/topology.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/widget/widgets/topology.js b/src/widget/widgets/topology.js index dcdc57d..d9e5d82 100644 --- a/src/widget/widgets/topology.js +++ b/src/widget/widgets/topology.js @@ -16,7 +16,7 @@ ******************************************************************************/ import React from 'react'; -import {ReactSVGPanZoom} from 'react-svg-pan-zoom'; +import {UncontrolledReactSVGPanZoom} from 'react-svg-pan-zoom'; import config from '../../config'; import '../../styles/simple-spinner.css'; import { cimsvg } from 'libcimsvg'; @@ -149,6 +149,13 @@ class WidgetTopology extends React.Component { render() { var markup = null; + const miniatureProps = { + miniaturePosition: "none", + } + + const toolbarProps = { + toolbarPosition: "none" + } switch(this.state.dashboardState) { case 'loading': @@ -157,12 +164,12 @@ class WidgetTopology extends React.Component { markup =
{ this.state.message }
; break; default: markup = (
- this.Viewer = Viewer} style={{outline: "1px solid grey"}} detectAutoPan={false} - miniaturePosition="none" - toolbarPosition="none" + toolbarProps={toolbarProps} + miniatureProps={miniatureProps} background="white" tool="pan" width={this.props.widget.width-2} height={this.props.widget.height-2} > @@ -173,7 +180,7 @@ class WidgetTopology extends React.Component { - +
); } return markup;