Skip to content

SettingsNavigation with both fit_to_screen and zoom_and_pan enabled causes zoom and pan to immediately snap back to original position #295

@BloodStainedCrow

Description

@BloodStainedCrow

Users trying to have a panning graph will most likely do

GraphView::new(&mut graph).with_navigations(&SettingsNavigation::new().with_zoom_and_pan_enabled(true));

expecting this to allow panning/zooming.

This does not work since fit_to_screen is enabled by default and not disabled by with_zoom_and_pan_enabled(true).

This is fixed by the user disabling fit_to_screen using with_fit_to_screen_enabled(false), but that is neither enforced by with_zoom_and_pan_enabled(true), a builder pattern or mentioned in any docs I could find.

Enabling both at the same time does not make any sense, so it should be either impossible or at least not the result of the intuitive usage of the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions