autoScroll in DocumentScroll jumps other blocks into view

Hi,

I have a canvas which is set to go.Diagram.DocumentScroll and I have autoScroll enabled. I notice that when I have a single block far away from other blocks, and I autoScroll to those other blocks, the viewport ‘pops’ in a way in which the non-dragged blocks are centered into view and it seems like the dragged block just jumped a big distance.

To replicate this, you can go to Scroll Modes GoJS Sample and drag one of the blocks down to a point where none of the other blocks are visible. Release the block down at this position, and then drag that block back to the top of the viewport so it is autoscrolling up. As soon as this happens, the viewport jumps to center the non-moved blocks, and it looks like the dragged block jumped a huge amount.

This does not happen when setting scroll mode to InfiniteScroll, but having the scrollbar visible is important for me so I do not want to switch scroll modes.

Is there a good way to make the diagram scroll back up without this jump effect?

Thanks.

edit: I think I see what you mean: The second time you auto-scroll, it immediately jumps because the entire document bounds (except the node you are holding) are now off screen. It’s quite jarring, and we’ll consider a way to change this functionality to be better.

Yep, that’s exactly what I mean. It’d be great if there was a way to remove this jump.

Thanks for looking into it.

@maciej I’ve built a provisional version for testing, can you download it and give it a try, and tell me if it works more like what you’d expect?

[EDIT: removed obsolete link]

Hi Simon, yes, that looks a lot better and is what I would expect to have happen during the auto scroll.

Is the new behavior something we should expect in the next version of GoJS?

Yes, its just good for us to get independent confirmation that it works as our customer would like, before we release. So thanks for that.

This will be in the next release, probably Friday or Monday. We’ll post again here when it’s out.

Hello @maciej, we’ve just relased 1.8.32, which should fix this autoscroll issue.

Cool, just updated my version and trying it out now. Thanks.