aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-06-15 22:46:40 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-06-15 22:46:40 -0400
commitc3b1877b4d17715416267ff3601cc982ca3b1535 (patch)
tree7caba309427b3b9586ed3fb23a30818b3c2a7acf /src
parent6763fc89d2ba9782d88a7677661dbe5ae27ee097 (diff)
partial fix for dragging tree view items
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionTreeView.scss3
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionTreeView.scss b/src/client/views/collections/CollectionTreeView.scss
index 2568bf182..f6df96d92 100644
--- a/src/client/views/collections/CollectionTreeView.scss
+++ b/src/client/views/collections/CollectionTreeView.scss
@@ -88,14 +88,11 @@
display:flex;
}
.treeViewItem-header-above {
- border: transparent 1px solid;
border-top: black 1px solid;
}
.treeViewItem-header-below {
- border: transparent 1px solid;
border-bottom: black 1px solid;
}
.treeViewItem-header-inside {
- border: transparent 1px solid;
border: black 1px solid;
} \ No newline at end of file
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 65b364c47..809b2af2b 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -71,6 +71,7 @@ class TreeView extends React.Component<TreeViewProps> {
@action onMouseLeave = () => { this._isOver = false; }
onPointerEnter = (e: React.PointerEvent): void => {
+ console.log("ENTER = " + this.props.document.title);
this.props.active() && (this.props.document.libraryBrush = true);
if (e.buttons === 1) {
this._header!.current!.className = "treeViewItem-header";
@@ -90,9 +91,9 @@ class TreeView extends React.Component<TreeViewProps> {
let before = x[1] < bounds[1];
let inside = x[0] > bounds[0] + 75 || (!before && this._bulletType === BulletType.Collapsible);
this._header!.current!.className = "treeViewItem-header"
- if (inside && this._bulletType != BulletType.List) this._header!.current!.className = "treeViewItem-header-inside";
- else if (before) this._header!.current!.className = "treeViewItem-header-above";
- else if (!before) this._header!.current!.className = "treeViewItem-header-below";
+ if (inside && this._bulletType != BulletType.List) this._header!.current!.className += " treeViewItem-header-inside";
+ else if (before) this._header!.current!.className += " treeViewItem-header-above";
+ else if (!before) this._header!.current!.className += " treeViewItem-header-below";
e.stopPropagation();
}
onPointerDown = (e: React.PointerEvent) => {