Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
scripta
eScriptorium
Commits
b8d98eb6
Commit
b8d98eb6
authored
Aug 07, 2020
by
Robin Tissot
Browse files
Adds a way to select overlaping regions.
parent
267a9d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/escriptorium/static/js/baseline.editor.js
View file @
b8d98eb6
...
...
@@ -1177,6 +1177,16 @@ class Segmenter {
onMouseDown
(
event
)
{
if
(
isRightClick
(
event
.
event
))
return
;
if
(
this
.
selecting
)
{
if
(
this
.
mode
==
'
regions
'
)
{
// if what we are selecting is already selected, check there isn't something below
for
(
let
i
=
0
;
i
<
this
.
regions
.
length
;
i
++
)
{
if
(
this
.
selecting
.
selected
&&
this
.
regions
[
i
]
!=
this
.
selecting
)
{
let
hit
=
this
.
regions
[
i
].
polygonPath
.
hitTest
(
event
.
point
);
if
(
hit
)
this
.
selecting
=
this
.
regions
[
i
];
break
;
}
}
}
// selection
if
(
event
.
event
.
shiftKey
)
{
this
.
selecting
.
toggleSelect
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment