Skip to content

Commit

Permalink
Add support for step size in Slider
Browse files Browse the repository at this point in the history
Co-Authored-By: karlwessel <[email protected]>
  • Loading branch information
fonsp and karlwessel committed Apr 29, 2020
1 parent 6df26c0 commit 44986e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PlutoUI"
uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
authors = ["Fons van der Plas <[email protected]>"]
version = "0.2.0"
version = "0.2.1"

[deps]

Expand Down
4 changes: 2 additions & 2 deletions src/Builtins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ struct Slider
end

function show(io::IO, ::MIME"text/html", slider::Slider)
print(io, """<input type="range" min="$(slider.range.start)" max="$(slider.range.stop)" value="$(slider.range.start)">""")
print(io, """<input type="range" min="$(first(slider.range))" step="$(step(slider.range))" max="$(last(slider.range))" value="$(first(slider.range))">""")
end

peek(slider::Slider) = first(slider.range)



struct Button
label::String
label::AbstractString
end
Button() = Button("Click")

Expand Down

2 comments on commit 44986e2

@fonsp
Copy link
Member Author

@fonsp fonsp commented on 44986e2 Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/13858

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:

git tag -a v0.2.1 -m "<description of version>" 44986e2f02f36b2934f40dad73bd94d68962e741
git push origin v0.2.1

Please sign in to comment.