Cytoscape: refresh stylesheet without refreshing the view

Hello there,

I am trying to build a dashboard that include a cytoscape network.
Everything is fine to display nodes and edges with the correct representations.
I added an update of the stylesheet using callback when user click on a node.
It highlights the selected node and all the other bound nodes.

The problem is that it reset the view (dezoom and change nodes places as my layout is ‘cose’).
I would like to select nodes and highlight them without changing the view of the network.
It that possible ?

Sorry if this topic has been already treated, I could not find a similar issue during my research.
Thank you

I changed the layout type for this map, I used cose-bilkent instead :

Dashboard

import dash_html_components as html
import dash_core_components as dcc
import dash_cytoscape as cyto
from dash.dependencies import Input, Output

Load extra layouts

cyto.load_extra_layouts()

[…]

                                dcc.Loading(
                                    id='infra-map-loading',
                                    className='infra-map',
                                    type='cube',
                                    children=[cyto.Cytoscape(
                                        id='network',
                                        # layout={'name': 'breadthfirst'},
                                        # layout={'name': 'concentric'},
                                        # layout={'name': 'circle'},
                                        # layout={'name': 'cose'},
                                        # layout={'name': 'cose-bilkent'},
                                        # layout={'name': 'cola'},
                                        layout={'name': 'euler'},
                                        style={'width': '100%', 'height': '700px'},
                                        stylesheet=STYLESHEET,
                                    )]
                                ),