aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LabelBox.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-03-02 23:35:15 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-03-02 23:35:15 -0500
commit067377e138254c72ad4cf3609b05d5aab2b71a26 (patch)
tree9ce9b22e585a0e1472eb3216630c2404e8517144 /src/client/views/nodes/LabelBox.tsx
parent95451a2eb0871856b946fff8a14ca0c385af5f1b (diff)
parent1b481cd441cc8bb200906b246b43e4bc5dc53b4e (diff)
agh stop merging
Diffstat (limited to 'src/client/views/nodes/LabelBox.tsx')
-rw-r--r--src/client/views/nodes/LabelBox.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/nodes/LabelBox.tsx b/src/client/views/nodes/LabelBox.tsx
index 87d5b07a2..6a7793ff0 100644
--- a/src/client/views/nodes/LabelBox.tsx
+++ b/src/client/views/nodes/LabelBox.tsx
@@ -59,9 +59,8 @@ export class LabelBox extends ViewBoxBaseComponent<FieldViewProps, LabelDocument
}
@observable _mouseOver = false;
- @computed get backColor() { return this.clicked || this._mouseOver ? StrCast(this.layoutDoc.hovercolor) : "unset"; }
+ @computed get hoverColor() { return this._mouseOver ? StrCast(this.layoutDoc._hoverBackgroundColor) : "unset"; }
- @observable clicked = false;
// (!missingParams || !missingParams.length ? "" : "(" + missingParams.map(m => m + ":").join(" ") + ")")
render() {
const params = Cast(this.paramsDoc["onClick-paramFieldKeys"], listSpec("string"), []);
@@ -70,15 +69,12 @@ export class LabelBox extends ViewBoxBaseComponent<FieldViewProps, LabelDocument
const label = typeof this.rootDoc[this.fieldKey] === "string" ? StrCast(this.rootDoc[this.fieldKey]) : StrCast(this.rootDoc.title);
return (
<div className="labelBox-outerDiv"
- onClick={action(() => this.clicked = !this.clicked)}
onMouseLeave={action(() => this._mouseOver = false)}
onMouseOver={action(() => this._mouseOver = true)}
ref={this.createDropTarget} onContextMenu={this.specificContextMenu}
style={{ boxShadow: this.props.styleProvider?.(this.layoutDoc, this.props, StyleProp.BoxShadow) }}>
<div className="labelBox-mainButton" style={{
- background: StrCast(this.layoutDoc.backgroundColor),
- backgroundColor: this.backColor,
- color: StrCast(this.layoutDoc.color, "inherit"),
+ backgroundColor: this.hoverColor,
fontSize: StrCast(this.layoutDoc._fontSize) || "inherit",
fontFamily: StrCast(this.layoutDoc._fontFamily) || "inherit",
letterSpacing: StrCast(this.layoutDoc.letterSpacing),