Add panning ability to message views

Issue #265 resolved
Matthias Schoettle created an issue

Currently, it is not possible to move the message view around, especially if it exceeds the screen.

Potentially zooming should be supported as well.

Comments (11)

  1. Matthias Schoettle reporter

    References #265: Moved general gesture capabilities of StructuralDiagramView into super-class AbstractView. This includes scale, zoom, panning and dragging. An AbstractViewHandler is used to take care of these (moved out of StructuralViewHandler).

    Other views can then build upon this when required. This also supports the addition of a menu to the view in the future.

    → <<cset e11bd9996db8>>

  2. Matthias Schoettle reporter

    References #265: Moves the responsibility to register input processors to the sub-class of AbstractView.

    • Renames unistroke drawing layer
    • fixes issues related to the parent of the view

    → <<cset 0028dfb42364>>

  3. Matthias Schoettle reporter

    References #265: Fixes some small problems in the AbstractViewHandler, such as wrong target. For wheel events, it is important to make sure that the right handler handles the event, since it is global, all handlers receive the event. This makes it necessary to ensure that the targets handler is responsible for handling the event.

    → <<cset faa7d3933b39>>

  4. Matthias Schoettle reporter

    References #265: Changes the message view handler to use AbstractViewHandler. Currently, it supports only drag/pan events. Zooming does not work nicely (the arrows and lines are often placed incorrectly once the lines are updated).

    To work properly, the position used for drawing needs to be relative to the parent (the container layer). However, the end view of messages is located on the lifeline and on one of the event containers. Therefore, the global position is used and translated into a relative position to the lifeline's parent.

    Layouting still uses the global position, because only heights and their differences are calculated.

    → <<cset 9cd391a6f7c3>>

  5. Matthias Schoettle reporter

    References #265: Moves handling of event(s) on message into a separate handler just for messages, to better separate different responsibilities.

    → <<cset 84610172384c>>

  6. Matthias Schoettle reporter

    References #265: Fixes problems with layouting and overwritten methods.

    • If the layout mechanism is used, the actual view will never receive if the container layer is an MTComponent and has no layout. It is now a RamRectangleComponent with a "fake" default layout.
    • When containsChild or removeChild is called with an actual component reference, in case it is one of the two layers, the super methods need to be called. However, other methods that use indices have no effect when dealing with actual children of the view (and not the container layer).

    → <<cset 55ebe72df100>>

  7. Matthias Schoettle reporter

    Zooming generally works, but creates weird effects. It seems that the end positions of the messages are not correctly translated into relative positions. They are slightly off. Also, when creating new messages, they can appear in the wrong place.

  8. Matthias Schoettle reporter

    References #265: Fixes the positioning of create lifelines. The position used a global position, whereas a relative to parent position is required for the lifeline.

    → <<cset e5d522a6fc7f>>

  9. Log in to comment