Skip to content

Allow to access Board state in Pluto notebooks via @bind #12

@j-fu

Description

@j-fu

Feature Description

It would be great if it would be possible to access the interior data of a board from within a Pluto notebook via the @Bind mechanism.

I played around with this some time ago out of possible need, and it would another nice unique selling point of JSXGraph.jl... I guess @fonsp would like this too.

Use Case

Something like this in a Pluto cell:

@bind bordstate Board(...)

boardstate would be a Dict which contains e.g. the interactive point positions in the board.
A the same time, this cell would render the board as usual.

Proposed Solution

See the pluto notebook in this gist .

Basically a dict with the data needs to be assigned to the .value entry of the html object wrapping the board, and it has to be kept up to date during board updates. Possibly this could be made optional via a bindable kwarg and state variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions