diff options
| author | bob <bcz@cs.brown.edu> | 2019-04-30 09:27:27 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-04-30 09:27:27 -0400 |
| commit | 86e89178628a27a91665ad835046e536bdb89729 (patch) | |
| tree | e289b4a963be5c6a692aac6ebb8f556165ff3f21 | |
| parent | 6b116d69a5b1a991c7aa00e2b23af3f8db7c7d77 (diff) | |
| parent | 041286093aef2e1f5a2b503959146124f292cc2b (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
| -rw-r--r-- | src/client/views/DocumentDecorations.scss | 2 | ||||
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 4 | ||||
| -rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 1 | ||||
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index 27b94e6d2..0dfa6f0ff 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -135,7 +135,7 @@ grid-column: 1/4; } -.linkButton-empty { +.linkButton-empty, .linkButton-nonempty { height: 20px; width: 20px; border-radius: 50%; diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 18449ed32..de17e1aef 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -496,7 +496,9 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> anchorPoint={anchorPoints.RIGHT_TOP} content={<LinkMenu docView={selFirst} changeFlyout={this.changeFlyoutContent} />}> - <div className={"linkButton-" + (selFirst.props.Document.GetData(KeyStore.LinkedToDocs, ListField, []).length ? "nonempty" : "empty")} onPointerDown={this.onLinkButtonDown} >{linkCount}</div> + <div className={"linkButton-" + (selFirst.props.Document.GetData(KeyStore.LinkedToDocs, ListField, []).length || + selFirst.props.Document.GetData(KeyStore.LinkedFromDocs, ListField, []).length + ? "nonempty" : "empty")} onPointerDown={this.onLinkButtonDown} >{linkCount}</div> </Flyout>); } diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index a3a82036d..bad78cbd5 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -134,6 +134,7 @@ export class CollectionFreeFormDocumentView extends React.Component<CollectionFr onPointerDown = (e: React.PointerEvent): void => { this._downX = e.clientX; this._downY = e.clientY; + e.stopPropagation(); } onClick = (e: React.MouseEvent): void => { e.stopPropagation(); diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 6dddab600..e8e4e8d3f 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -181,7 +181,6 @@ export class DocumentView extends React.Component<DocumentViewProps> { document.removeEventListener("pointerup", this.onPointerUp); document.addEventListener("pointerup", this.onPointerUp); e.preventDefault(); - e.stopPropagation(); } } onPointerMove = (e: PointerEvent): void => { |
