Skip to content
Snippets Groups Projects
Commit 38c18334 authored by Ulrich Schöpp's avatar Ulrich Schöpp Committed by Ulrich Schöpp
Browse files

Improve zooming, panning, performance in DiagramViewer


Zoom:
- When zooming with ctrl-scroll, the viewer fixes the content
  under the mouse pointer, so that zooming does not move the
  content.
- On Linux, zoom did not work proper. The grid was zoomed,
  but the content remained unchanged.

Panning:
- The viewer now supports panning with ctrl-drag.

Other changes:
- The code for zooming and moving the content has been simplified.
  Rather than applying transformations to all nodes separately and
  repeating coordinate calculations, the content scale and
  translation is now controlled by a single transformation.
  Coordinate transformations are done using JavaFX's methods.
- The GridCanvas has been optimized to avoid redrawing its content
  (which resulted in a noticable slow-down during panning). The
  grid canvas is not redrawn when the content is only moved.

Signed-off-by: default avatarUlrich Schöpp <schoepp@fortiss.org>
Issue-Ref: 4181
parent 31433bed
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment