-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using Stipple | ||
using Stipple.ReactiveTools | ||
|
||
# testing can be down without StippleUI, it only breaks rendering which we don't test | ||
# using StippleUI | ||
|
||
using StippleMakie | ||
|
||
Stipple.enable_model_storage(false) | ||
|
||
# ------------------------------------------------------------------------------------------------ | ||
|
||
# if required set a different port, url or proxy_port for Makie's websocket communication, e.g. | ||
# otherwise, Genie's settings are applied for listen_url and proxy_url and Makie's (Bonito's) settings are applied for the ports | ||
configure_makie_server!(listen_port = rand(8081:8999)) | ||
|
||
@app MakieDemo begin | ||
@out fig1 = MakieFigure() | ||
@out fig2 = MakieFigure() | ||
|
||
@onchange isready begin | ||
init_makiefigures(__model__) | ||
# Wait until plots are ready to be written to | ||
# sleep(0.3) | ||
# Makie.scatter(fig1.fig[1, 1], (0:4).^3) | ||
# Makie.heatmap(fig2.fig[1, 1], rand(5, 5)) | ||
# Makie.scatter(fig2.fig[1, 2], (0:4).^3) | ||
end | ||
end | ||
|
||
|
||
UI::ParsedHTMLString = column(style = "height: 80vh; width: 98vw", [ | ||
h4("MakiePlot 1") | ||
cell(col = 4, class = "full-width", makie_figure(:fig1)) | ||
h4("MakiePlot 2") | ||
cell(col = 4, class = "full-width", makie_figure(:fig2)) | ||
]) | ||
|
||
ui() = UI | ||
|
||
model = @init MakieDemo | ||
html!(ui, layout = Stipple.ReactiveTools.DEFAULT_LAYOUT(head_content = [makie_dom(model)]), model = model, context = @__MODULE__) | ||
|
||
model.isready[] = true | ||
|
||
nothing |
0c29f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
0c29f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request updated: JuliaRegistries/General/120711
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: