dash-cytoscape icon indicating copy to clipboard operation
dash-cytoscape copied to clipboard

Reset layout does not work when animate=True

Open vivekvs1 opened this issue 6 years ago • 0 comments

Hi,

Taking the example code: usage-reset-button.py and setting animate=True with the dagre layout results in the layout not resetting its position with the pushbutton.

Thanks, Vivek

Description

Steps/Code to Reproduce

layout = {
    "name": "dagre",
    "spacingFactor": 0.8,
    "nodeSep": 60,
    "rankSep": 50,
    "rankDir": "TB",  # TB or LR
    "ranker": "tight-tree",
    "nodeDimensionsIncludeLabels": True,
     "animate": True,
    "fit": True,
    "zoom": 0.5,
    "animationDuration": 50,
     "selectionType": "single",

}

Expected Results

Layout reset (zoom and position when the elements and zoom vars are set through a callback

Actual Results

The position and zoom are overridden somehow while using animate=True

Versions

dash==0.41.0 dash-cytoscape==0.1.1

vivekvs1 avatar Apr 17 '19 16:04 vivekvs1