Skip to content

Commit

Permalink
disable creation of new audio annotations in readony mode
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Nov 20, 2014
1 parent 9700923 commit 60cff78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/coffee/audioplayer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ class AudioPlayer
newTime = totalTime * (ec.y / @height)
@audio.currentTime = newTime
else
if @readOnly
return
# Annotation stuff
ec = @eventCoords e
time = @pixelsToSeconds ec.y
annotation = @annotationAt time
if annotation? and !@readOnly
if annotation?
# Move
@audiodrag = new AudioDrag time, (timeDelta) =>
originalStart = annotation.start
Expand Down

0 comments on commit 60cff78

Please sign in to comment.