Skip to content

Interaction.PlotActions are not respected #3304

@Nils-Berghs

Description

@Nils-Berghs

Issue: The PlotActions on the Interaction class can be set, but they will be replaced by the Standard PlotActions after an 'Disable'/'Enable' cycle. There is an overload for 'Enable' which takes a custom plot actions object but that is different from the how the InputBingings in the interactions work

ScottPlot Version: 5020

Code Sample: Issue can be simulated with the

ScottPlot.Plot myPlot = new();
InputBindings customInputBindings = new()
{
    ....
};
CustomPlotActions customPlotActions = new()
{
    ToggleBenchmark = delegate { },
    ...
}

Interaction interaction = new(myPlot)
{
    Inputs = customInputBindings,
    Actions = customActions,
};
myPlot.Interaction = interaction;

....
//this is where it goes wrong
myPlot.Interaction.Enable();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions