diff options
Diffstat (limited to 'src/client/views/nodes/FontIconBox.tsx')
-rw-r--r-- | src/client/views/nodes/FontIconBox.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx index 56c79cde9..6ae4b9726 100644 --- a/src/client/views/nodes/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox.tsx @@ -49,14 +49,12 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>( const presTrailsIcon = <img src={`/assets/${"presTrails.png"}`} style={{ width: presSize, height: presSize, filter: `invert(${color === "white" ? "100%" : "0%"})`, marginBottom: "5px" }} />; const button = <button className={`menuButton-${shape}`} onContextMenu={this.specificContextMenu} - style={{ - backgroundColor: this.layoutDoc.iconShape === "square" ? backgroundColor : "", - }}> + style={{ backgroundColor: backgroundColor, }}> <div className="menuButton-wrap"> {icon === 'pres-trail' ? presTrailsIcon : <FontAwesomeIcon className={`menuButton-icon-${shape}`} icon={icon} color={color} size={this.layoutDoc.iconShape === "square" ? "sm" : "sm"} />} {!label ? (null) : <div className="fontIconBox-label" style={{ color, backgroundColor }}> {label} </div>} - {this.props.Document.watchedDocuments ? <FontIconBadge collection={Cast(this.props.Document.watchedDocuments, Doc, null)} /> : (null)} + <FontIconBadge collection={Cast(this.rootDoc.watchedDocuments, Doc, null)} /> </div> </button>; return !this.layoutDoc.toolTip ? button : @@ -67,7 +65,7 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>( } interface FontIconBadgeProps { - collection: Doc; + collection: Doc | undefined; } @observer @@ -77,7 +75,7 @@ export class FontIconBadge extends React.Component<FontIconBadgeProps> { onPointerDown = (e: React.PointerEvent) => { setupMoveUpEvents(this, e, (e: PointerEvent) => { - const dragData = new DragManager.DocumentDragData([this.props.collection]); + const dragData = new DragManager.DocumentDragData([this.props.collection!]); DragManager.StartDocumentDrag([this._notifsRef.current!], dragData, e.x, e.y); return true; }, |