First attempt to expand group fails

Here is the video I’ve done for better explanation:
https://www.screencast.com/t/OMjvgFfpgv

As you can see, after the first click on the expander button, block does not expand, Instead of that the whole area scrolled a little. After that everything works just fine with any position of scrollbar and you can expand and collapse any block.

Can you help me with this issue? I have no idea what it can be connected with. Maybe there is some information I should provide for you?

Thanks.

How did you initialize your diagram? Besides setting properties on the Diagram, including templates, did you create a model and assign Diagram.model? Is there anything else that you did afterwards?

I don’t do any specific things afterwards, but maybe it will help you: the problem occurs only if graph has height more then screen can contain. So, the way to reproduce the bug is

  • draw graph with big height
  • scroll page the way just top part of the graph is on the screen
  • click anywhere outside the graph (just for losing focus)
  • click anywhere inside the graph

The easiest way to reproduce is to set height of the div.diagramStyling in the first example (click counter) on this page to 3000px and go through all the steps.

Thank you.

https://www.screencast.com/t/4p4TVW22

A video with the bug for better understanding. I used exactly that example that I described.

Ah, if you are programmatically changing the height or width of the HTML DIV element that holds a Diagram, you need to call Diagram.requestUpdate.

Read more about this at Resizing Diagrams -- Northwoods Software.

No, I don’t. Graph is initialized with some height and doesn’t change it.

Oh, are you saying that the whole page scrolls when giving focus to the diagram? Not that there is scrolling within the Diagram? Perhaps you are actually talking about: The page will scroll down automatically if i click diagram region

Yes, I should have googled better. Thanks a lot.

Not to worry – it seems I can never find what I want when I use Google to search the web. That’s why we’re here to answer your questions.