Skip to content

Allow extending the zoom plugin for custom scales #169

Closed
@wheercool

Description

@wheercool

Hi, I'm looking for ability to inject custom scale, but it looks like it is impossible.

I can do it only manually adding my scale to the list of zoom/panFunctions.

zoomNS.zoomFunctions.category = zoomIndexScale;
zoomNS.zoomFunctions.time = zoomTimeScale;
zoomNS.zoomFunctions.linear = zoomNumericalScale;
zoomNS.zoomFunctions.duration = zoomNumericalScale;  // this was added
zoomNS.zoomFunctions.logarithmic = zoomNumericalScale;
zoomNS.panFunctions.category = panIndexScale;
zoomNS.panFunctions.time = panTimeScale;
zoomNS.panFunctions.linear = panNumericalScale;
zoomNS.panFunctions.duration = panNumericalScale; // this was added
zoomNS.panFunctions.logarithmic = panNumericalScale;

My custom duration scale works almost exactly like a linear. Is there any solution I can inject my scale w/o touching source code?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions