aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LinkAnchorBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-16 00:38:06 -0500
committerGitHub <noreply@github.com>2020-12-16 00:38:06 -0500
commit0f52fdb7dc2555bc2f6797a462d715b0e035eb23 (patch)
treee8b7664d5e5ab3e9bc9dd7d03ff71a8e0ed134e9 /src/client/views/nodes/LinkAnchorBox.tsx
parent84849091ceaec757e545ab5ea69cd9d6ff46f6d2 (diff)
parent3fd3a5d8a130b32cd60c30904c3ce1d5d86de825 (diff)
Merge pull request #941 from browngraphicslab/contentScalingUpdate
Content scaling update
Diffstat (limited to 'src/client/views/nodes/LinkAnchorBox.tsx')
-rw-r--r--src/client/views/nodes/LinkAnchorBox.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/LinkAnchorBox.tsx b/src/client/views/nodes/LinkAnchorBox.tsx
index abefc6561..f035fba33 100644
--- a/src/client/views/nodes/LinkAnchorBox.tsx
+++ b/src/client/views/nodes/LinkAnchorBox.tsx
@@ -119,7 +119,7 @@ export class LinkAnchorBox extends ViewBoxBaseComponent<FieldViewProps, LinkAnch
const x = NumCast(this.rootDoc[this.fieldKey + "_x"], 100);
const y = NumCast(this.rootDoc[this.fieldKey + "_y"], 100);
const linkSource = this.props.styleProvider?.(this.dataDoc, this.props, StyleProp.LinkSource);
- const background = this.props.styleProvider?.(this.dataDoc, this.props, StyleProp.ItemBackgroundColor);
+ const background = this.props.styleProvider?.(this.dataDoc, this.props, StyleProp.BackgroundColor);
const anchor = this.fieldKey === "anchor1" ? "anchor2" : "anchor1";
const anchorScale = !this.dataDoc[this.fieldKey + "-useLinkSmallAnchor"] && (x === 0 || x === 100 || y === 0 || y === 100) ? 1 : .25;
@@ -142,11 +142,12 @@ export class LinkAnchorBox extends ViewBoxBaseComponent<FieldViewProps, LinkAnch
Location: [e.clientX, e.clientY + 20]
})}
onPointerDown={this.onPointerDown} onClick={this.onClick} title={targetTitle} onContextMenu={this.specificContextMenu}
- ref={this._ref} style={{
+ ref={this._ref}
+ style={{
background,
left: `calc(${x}% - ${small ? 2.5 : 7.5}px)`,
top: `calc(${y}% - ${small ? 2.5 : 7.5}px)`,
- transform: `scale(${anchorScale / this.props.ContentScaling()})`
+ transform: `scale(${anchorScale})`
}} >
{!this._editing && !this._forceOpen ? (null) :
<Flyout anchorPoint={anchorPoints.LEFT_TOP} content={flyout} open={this._forceOpen ? true : undefined} onOpen={() => this._isOpen = true} onClose={action(() => this._isOpen = this._forceOpen = this._editing = false)}>