aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-03-04 18:37:23 -0500
committerbob <bcz@cs.brown.edu>2020-03-04 18:37:23 -0500
commit3d22c2551b9c4acf7cd24496556603740f6d0736 (patch)
tree5a9d84cbdcac3995e84699e7e1b0840c7826fe36 /src/client/views/nodes
parent26c973ecb47de86d94c39d71ad00ece38a85d623 (diff)
fixes for dropped documents getting links to an active audio.
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/AudioBox.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx
index e2002a596..2b19ca341 100644
--- a/src/client/views/nodes/AudioBox.tsx
+++ b/src/client/views/nodes/AudioBox.tsx
@@ -282,8 +282,7 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume
backgroundColor={returnTransparent} />
</div>
<div key={i} className="audiobox-marker" onPointerEnter={() => Doc.linkFollowHighlight(la1)}
- onPointerDown={e => { if (e.button === 0 && !e.ctrlKey) { this.playFrom(linkTime); e.stopPropagation(); } }}
- onClick={e => { if (e.button === 0 && !e.ctrlKey) { this.pause(); e.stopPropagation(); } }} />
+ onPointerDown={e => { if (e.button === 0 && !e.ctrlKey) { const wasPaused = this.audioState === "paused"; this.playFrom(linkTime); wasPaused && this.pause(); e.stopPropagation(); } }} />
</div>;
})}
<div className="audiobox-current" style={{ left: `${NumCast(this.Document.currentTimecode) / NumCast(this.dataDoc.duration, 1) * 100}%` }} />