Skip to content

Commit

Permalink
let users opt into Tab vs. Page
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed Oct 11, 2023
1 parent 649874a commit 963c334
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PlotlyLight"
uuid = "ca7969ec-10b3-423e-8d99-40f33abb42bf"
authors = ["joshday <emailjoshday@gmail.com>"]
version = "0.7.4"
version = "0.7.5"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand Down
5 changes: 4 additions & 1 deletion src/PlotlyLight.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Base.@kwdef mutable struct Settings
layout::Config = Config()
config::Config = Config()
iframe::Union{Nothing, Cobweb.IFrame} = nothing
display_object::Union{Type{Cobweb.Page}, Type{Cobweb.Tab}} = Cobweb.Page
end
function Base.show(io::IO, o::Settings)
println(io, "PlotlyLight.Settings:")
Expand All @@ -121,6 +122,8 @@ function Base.show(io::IO, o::Settings)
printstyled(io, " Config with keys: $(join(repr.(keys(o.config)), ", "))", '\n', color=:light_black)
printstyled(io, " • iframe: \n", color=:light_cyan)
printstyled(io, " ", repr(o.iframe), '\n', color=:light_black)
printstyled(io, " • display_object: \n", color=:light_cyan)
printstyled(io, " ", repr(o.display_object), '\n', color=:light_black)
end

const SETTINGS = Settings()
Expand Down Expand Up @@ -237,7 +240,7 @@ Base.:(==)(a::Plot, b::Plot) = a.data == b.data && a.layout == b.layout && a.con

#-----------------------------------------------------------------------------# Display
function page(o::Plot; remove_margins=false)
return Cobweb.Page(h.html(
return SETTINGS.display_object(h.html(
h.head(
h.meta(charset="utf-8"),
h.meta(name="viewport", content="width=device-width, initial-scale=1"),
Expand Down

2 comments on commit 963c334

@joshday
Copy link
Member Author

Choose a reason for hiding this comment

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

@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/93238

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.7.5 -m "<description of version>" 963c3345cb88b9388af91ba0e689655d1c161b60
git push origin v0.7.5

Also, note the warning: Version 0.7.5 skips over 0.7.4
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.