Skip to content

Demand-Supply graph: Intersection bug #3345

@nikolas

Description

@nikolas

In the initial state of the Demand-Supply graph, changing the slope of either line tilts the line at its intersection. When you drag the lines with the mouse to new positions and then change the slope, the line is tilted at an arbitrary location deemed its "center" by the graph-drawing system. This is due to how the lines in this graph type are drawn: https://github.com/ccnmtl/econplayground/blob/master/media/js/src/graphs/DemandSupplyGraph.js#L9

I intentionally didn't make these lines jsxgraph functiongraph objects, because they are draggable. This isn't set in stone though - and can change if there is a better method for doing this.

This is a long-standing, but relatively minor issue. But there is possibly a solution involving some math.

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