diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-10-24 00:56:00 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-10-24 00:56:00 -0400 |
commit | 31166219e473e105b8fd9d49627fd1df58822c55 (patch) | |
tree | b8fbe81c9f7745269735e40bf9c00de9cb19dcf0 /src | |
parent | 910e4d8a22a312d2ca0b8a970ff434604f7c6f91 (diff) |
fixed audio box shrinking layout. fixed pdf z-index issue in stacking panels.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/AudioBox.scss | 31 | ||||
-rw-r--r-- | src/client/views/nodes/AudioBox.tsx | 16 | ||||
-rw-r--r-- | src/client/views/nodes/PDFBox.scss | 1 |
3 files changed, 38 insertions, 10 deletions
diff --git a/src/client/views/nodes/AudioBox.scss b/src/client/views/nodes/AudioBox.scss index 3d6f6c4f9..ccbf0d75f 100644 --- a/src/client/views/nodes/AudioBox.scss +++ b/src/client/views/nodes/AudioBox.scss @@ -36,6 +36,8 @@ height:100%; position: relative; display: flex; + padding-left: 2px; + border: gray solid 3px; .audiobox-player { margin-top:auto; margin-bottom:auto; @@ -59,7 +61,7 @@ background-color: red; position: absolute;; } - .audiobox-linker { + .audiobox-linker, .audiobox-linker-mini { position:absolute; width:15px; min-height:10px; @@ -76,10 +78,24 @@ top: calc(100% - 15px) !important; } } - .audiobox-linker:hover { + .audiobox-linker-mini { + width:8px; + min-height:8px; + height:8px; + box-shadow: black 1px 1px 1px; + margin-left: -1; + margin-top: -2; + .docuLinkBox-cont { + width:8px !important; + height:8px !important; + left: calc(100% - 8px) !important; + top: calc(100% - 8px) !important; + } + } + .audiobox-linker:hover, .audiobox-linker-mini:hover { transform:scale(1.5); } - .audiobox-marker-container { + .audiobox-marker-container, .audiobox-marker-minicontainer { position:absolute; width:10px; height:100%; @@ -95,6 +111,15 @@ border: orange 2px solid; } } + .audiobox-marker-minicontainer { + width:5px; + border-radius: 1px; + .audiobox-marker { + position:relative; + height: calc(100% - 8px); + margin-top: 8px; + } + } } } } diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index 3933c6257..cc1c63d44 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -184,7 +184,10 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume } } - onPlay = (e: any) => this.playFrom(this._ele!.paused ? this._ele!.currentTime : -1); + onPlay = (e: any) => { + this.playFrom(this._ele!.paused ? this._ele!.currentTime : -1); + e.stopPropagation(); + } onStop = (e: any) => { this.pause(); this._ele!.currentTime = 0; @@ -213,7 +216,8 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume render() { let interactive = this.active() ? "-interactive" : ""; return (!this.extensionDoc ? (null) : - <div className={`audiobox-container`} onContextMenu={this.specificContextMenu} onClick={!this.path ? this.recordClick : undefined}> + <div className={`audiobox-container`} onContextMenu={this.specificContextMenu} + onClick={!this.path ? this.recordClick : undefined}> <div className="audiobox-handle"></div> {!this.path ? <button className={`audiobox-record${interactive}`} style={{ backgroundColor: this._audioState === "recording" ? "red" : "black" }}> @@ -221,8 +225,8 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume </button> : <div className="audiobox-controls"> <div className="audiobox-player" onClick={this.onPlay}> - <FontAwesomeIcon className="audiobox-playhead" icon={this._playing ? "pause" : "play"} size={this.props.PanelHeight() < 25 ? "1x" : "2x"} /> - <div className="audiobox-playhead" onClick={this.onStop}><FontAwesomeIcon className="audiobox-playhead" icon="stop" size={this.props.PanelHeight() < 25 ? "1x" : "2x"} /></div> + <FontAwesomeIcon className="audiobox-playhead" icon={this._playing ? "pause" : "play"} size={this.props.PanelHeight() < 36 ? "1x" : "2x"} /> + <div className="audiobox-playhead" onClick={this.onStop}><FontAwesomeIcon className="audiobox-playhead" icon="stop" size={this.props.PanelHeight() < 36 ? "1x" : "2x"} /></div> <div className="audiobox-timeline" onClick={e => e.stopPropagation()} onPointerDown={e => { if (e.button === 0 && !e.ctrlKey) { @@ -241,8 +245,8 @@ export class AudioBox extends DocExtendableComponent<FieldViewProps, AudioDocume la2 = l.anchor1 as Doc; linkTime = NumCast(l.anchor1Timecode); } - return !linkTime ? (null) : <div className="audiobox-marker-container" style={{ left: `${linkTime / NumCast(this.dataDoc.duration, 1) * 100}%` }}> - <div className="audioBox-linker" key={"linker" + i}> + return !linkTime ? (null) : <div className={this.props.PanelHeight() < 32 ? "audiobox-marker-minicontainer" : "audiobox-marker-container"} style={{ left: `${linkTime / NumCast(this.dataDoc.duration, 1) * 100}%` }}> + <div className={this.props.PanelHeight() < 32 ? "audioBox-linker-mini" : "audioBox-linker"} key={"linker" + i}> <DocumentView {...this.props} Document={l} layoutKey={Doc.LinkEndpoint(l, la2)} parentActive={returnTrue} bringToFront={emptyFunction} zoomToScale={emptyFunction} getScale={returnOne} backgroundColor={returnTransparent} /> diff --git a/src/client/views/nodes/PDFBox.scss b/src/client/views/nodes/PDFBox.scss index deb98dc8d..8bec4fbe3 100644 --- a/src/client/views/nodes/PDFBox.scss +++ b/src/client/views/nodes/PDFBox.scss @@ -6,7 +6,6 @@ width:100%; overflow: hidden; position:absolute; - z-index: -1; cursor:auto; } |