diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-11-05 16:32:05 -0500 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-11-05 16:32:05 -0500 |
| commit | 59e0e66dd7054f0770690c2e098e8e59b99ef463 (patch) | |
| tree | c035c72428184d32eef16331e086fb178d63d194 /src/client/views/nodes/DocuLinkBox.tsx | |
| parent | b1e9619a4e04a9784d927c766361d734f549d6c5 (diff) | |
| parent | 8160b5e1e79aedc7acc6f1dc418b428073ce2118 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into webcam_mohammad
Diffstat (limited to 'src/client/views/nodes/DocuLinkBox.tsx')
| -rw-r--r-- | src/client/views/nodes/DocuLinkBox.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocuLinkBox.tsx b/src/client/views/nodes/DocuLinkBox.tsx index f4c7d43aa..d73407903 100644 --- a/src/client/views/nodes/DocuLinkBox.tsx +++ b/src/client/views/nodes/DocuLinkBox.tsx @@ -72,7 +72,10 @@ export class DocuLinkBox extends DocComponent<FieldViewProps, DocLinkSchema>(Doc let y = NumCast(this.props.Document[this.props.fieldKey + "_y"], 100); let x = NumCast(this.props.Document[this.props.fieldKey + "_x"], 100); let c = StrCast(this.props.Document.backgroundColor, "lightblue"); - return <div className="docuLinkBox-cont" onPointerDown={this.onPointerDown} onClick={this.onClick} title={StrCast((this.props.Document[this.props.fieldKey === "anchor1" ? "anchor2" : "anchor1"]! as Doc).title)} + let anchor = this.props.fieldKey === "anchor1" ? "anchor2" : "anchor1"; + let timecode = this.props.Document[anchor + "Timecode"]; + let targetTitle = StrCast((this.props.Document[anchor]! as Doc).title) + (timecode !== undefined ? ":" + timecode : ""); + return <div className="docuLinkBox-cont" onPointerDown={this.onPointerDown} onClick={this.onClick} title={targetTitle} ref={this._ref} style={{ background: c, left: `calc(${x}% - 12.5px)`, top: `calc(${y}% - 12.5px)`, transform: `scale(${hasAnchor ? 0.333 : 1 / this.props.ContentScaling()})` |
