Skip to content

Manipulate works and doesn't #458

@kaltsoplyn

Description

@kaltsoplyn

First off: Just found out about WLJS, Amazing work, thank you, will contribute!!

To my question, I gather that dynamic stuff like Manipulate are maybe not "first-class citizens" in WLJS, but here's an observation.
This works for me:

Manipulate[Plot[Sin[2 π a x] Cos[2 π b x], {x, 0, 1}], {{a, 1}, 0, 5, 1}, {{b, 1}, {1->"low", 2->"med", 3->"high"}}]

But this doesn't:

freqSelection = {1->"low", 2->"med", 3->"high"};
Manipulate[Plot[Sin[2 π a x] Cos[2 π b x], {x, 0, 1}], {{a, 1}, 0, 5, 1}, {{b, 1}, freqSelection}]

But this works again:

freqSelection = {1->"low", 2->"med", 3->"high"};
Manipulate[Plot[Sin[2 π a x] Cos[2 π b x], {x, 0, 1}], {{a, 1}, 0, 5, 1}, Evaluate[{{b, 1}, freqSelection}]]

Any idea why this happens?

[Wolfram Engine 14.3 | WLJS 2.8.7-x64]

P.S.: not to highjack my own thread, but is there a roadmap for quality-of-experience improvements in the frontend (e.g. merge/split/move cells, shortcut to evaluate cell & move to next [like, ctrl + enter or something], multi-select cells etc.)?

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