From 41bb365dd4f787aec2262dcb07508e0de3837e10 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 29 Jan 2021 22:19:35 -0500 Subject: fixed dragging on timeline to create anchor --- src/client/views/collections/CollectionStackedTimeline.scss | 1 - src/client/views/collections/CollectionStackedTimeline.tsx | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionStackedTimeline.scss b/src/client/views/collections/CollectionStackedTimeline.scss index 9d1b46f27..cc56831f3 100644 --- a/src/client/views/collections/CollectionStackedTimeline.scss +++ b/src/client/views/collections/CollectionStackedTimeline.scss @@ -36,7 +36,6 @@ top: 2.5%; height: 95%; border-radius: 4px; - opacity: 0.3; &:hover { opacity: 1; } diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index a59ac109f..d4eb66fcc 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -135,8 +135,9 @@ export class CollectionStackedTimeline extends CollectionSubView 15) && CollectionStackedTimeline.createAnchor(this.rootDoc, this.dataDoc, this.props.fieldKey, this.props.startTag, this.props.endTag); + if (!isClick && CollectionStackedTimeline.SelectingRegion === this && (Math.abs(movement[0]) > 15)) { + CollectionStackedTimeline.createAnchor(this.rootDoc, this.dataDoc, this.props.fieldKey, this.props.startTag, this.props.endTag, + this._markerStart, this._markerEnd); } (!isClick || !wasSelecting) && (CollectionStackedTimeline.SelectingRegion = undefined); }), -- cgit v1.2.3-70-g09d2