Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Papermerge.Js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
Papermerge.Js
Commits
396d5a74
Commit
396d5a74
authored
3 years ago
by
Eugen Ciur
Browse files
Options
Downloads
Patches
Plain Diff
fix clicking bug
parent
952104e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/modifiers/ui_select.js
+15
-0
15 additions, 0 deletions
app/modifiers/ui_select.js
with
15 additions
and
0 deletions
app/modifiers/ui_select.js
+
15
−
0
View file @
396d5a74
...
...
@@ -9,6 +9,16 @@ class UISelect {
Desktop like select
**/
get
DRAG_THRESHOLD
()
{
/*
Some mouse clicks are acompanied by slight mouse movements, which
makes 'clicks' look like mouse drag events. In order the avoid
this confusion, DRAG_THRESHOLD is introduced. Any rectangle with
height or width < DRAG_THRESHOLD will be discarded.
*/
return
5
;
}
constructor
(
parent_selector
)
{
/***
x, y coordinates where selection started.
...
...
@@ -77,6 +87,11 @@ class UISelect {
new
Rectangle
(
left
,
top
,
width
,
height
)
);
if
(
width
<
this
.
DRAG_THRESHOLD
&&
height
<
this
.
DRAG_THRESHOLD
)
{
console
.
log
(
'
Not passing DRAG_THRESHOLD. Ignored.
'
);
return
;
}
this
.
select_nodes
(
selected_nodes
);
this
.
unselect_nodes
(
unselected_nodes
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment