aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentIcon.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-11 12:05:43 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-11 12:05:43 -0400
commitdf3fa2ceb0846491d05e362c28231c3679e021c5 (patch)
tree40bdc7e1408fb13897aed73780c3cd3ebf50ab5d /src/client/views/nodes/DocumentIcon.tsx
parentc2a2b8c119c44b167310485cede0920f313cd40a (diff)
doninfos
Diffstat (limited to 'src/client/views/nodes/DocumentIcon.tsx')
-rw-r--r--src/client/views/nodes/DocumentIcon.tsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/views/nodes/DocumentIcon.tsx b/src/client/views/nodes/DocumentIcon.tsx
index 79fc06279..0b94ae4f7 100644
--- a/src/client/views/nodes/DocumentIcon.tsx
+++ b/src/client/views/nodes/DocumentIcon.tsx
@@ -25,19 +25,16 @@ export class DocumentIcon extends ObservableReactComponent<DocumentIconProps> {
render() {
const { view } = this._props;
- const { left, top, right } = view.getBounds || { left: 0, top: 0, right: 0, bottom: 0 };
+ const { left, top, right, bottom } = view.getBounds || { left: 0, top: 0, right: 0, bottom: 0 };
return (
<div
className="documentIcon-outerDiv"
- onPointerEnter={action(() => { this._hovered = true; })} // prettier-ignore
- onPointerLeave={action(() => { this._hovered = false; })} // prettier-ignore
style={{
pointerEvents: 'all',
- opacity: this._hovered ? 0.3 : 1,
position: 'absolute',
background: SnappingManager.userBackgroundColor,
- transform: `translate(${(left + right) / 2}px, ${top}px)`,
+ transform: `translate(${left}px, ${bottom - (bottom - top)/2}px)`, //**!**
}}>
<Tooltip title={<div>{StrCast(this._props.view.Document?.title)}</div>}>
<p>d{this._props.index}</p>