diff --git a/src/files.jl b/src/files.jl index 022ea3ebd469d2b505d06125adc1f7705d1fc359..3c89f43a4ab17af2c65ee752cc048041c662300f 100644 --- a/src/files.jl +++ b/src/files.jl @@ -172,10 +172,11 @@ function loadfile(path) file = Formats.load(path) data = isempty(file.run) ? file.timeseries : file.run # tracks - times = PlanarLarvae.times(data) if file isa Formats.FIMTrack + times = PlanarLarvae.times(data) tracks = [LarvaModel(track, times) for track in values(getrun(file))] else + times = PlanarLarvae.times(gettimeseries(file)) tracks = [LarvaModel(id, ts, times) for (id, ts) in pairs(gettimeseries(file))] end # dataset diff --git a/src/larvatagger.css b/src/larvatagger.css index c4bbf268caa894af67cadadc8cef87a70ad69ee5..d47a8a6464a896611d0b9e0da7c08b652576cc6d 100644 --- a/src/larvatagger.css +++ b/src/larvatagger.css @@ -149,6 +149,9 @@ input[type=text]:disabled { .player button { margin-left: 0.25rem; } +.player input[type=range]:focus { + outline: none; +} #tag-selector { width: 1000px; diff --git a/src/models.jl b/src/models.jl index 1351c3deff41cec84ae9848c86b84738e304ee64..77176a66f3981f64c9727df20761e656790baeb4 100644 --- a/src/models.jl +++ b/src/models.jl @@ -212,6 +212,7 @@ struct LarvaModel end function LarvaModel(id::LarvaID, timeseries::PlanarLarvae.TimeSeries{<:NamedTuple}, times::Vector{PlanarLarvae.Time}) + @assert !isempty(times) alignedsteps = map(timeseries) do (t, _) findfirst(t′-> abs(t - t′) < TIME_PRECISION, times) end @@ -221,6 +222,7 @@ function LarvaModel(id::LarvaID, timeseries::PlanarLarvae.TimeSeries{<:NamedTupl end function LarvaModel(track::Track, times::Vector{PlanarLarvae.Time}) + @assert !isempty(times) alignedsteps = map(track.timestamps) do t findfirst(t′-> abs(t - t′) < TIME_PRECISION, times) end