animation.jl: using randstring() to generate unique tmp names (fix: 2239)

Browser caching prevents animations from being updated if names are not
unique. This solves Issue #2239.
This commit is contained in:
Johan Blåbäck 2019-11-06 15:17:51 +01:00
parent 464c0271f0
commit 31c4414c32

View File

@ -21,9 +21,9 @@ function frame(anim::Animation, plt::P=current()) where P<:AbstractPlot
push!(anim.frames, filename) push!(anim.frames, filename)
end end
giffn() = (isijulia() ? "tmp.gif" : tempname()*".gif") giffn() = (isijulia() ? "tmp_"*randstring()*".gif" : tempname()*".gif")
movfn() = (isijulia() ? "tmp.mov" : tempname()*".mov") movfn() = (isijulia() ? "tmp_"*randstring()*".mov" : tempname()*".mov")
mp4fn() = (isijulia() ? "tmp.mp4" : tempname()*".mp4") mp4fn() = (isijulia() ? "tmp_"*randstring()*".mp4" : tempname()*".mp4")
mutable struct FrameIterator mutable struct FrameIterator
itr itr