Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
6e5b6e11
Commit
6e5b6e11
authored
4 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
chore: allow only 1 region to be selected
parent
0f58219b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/src/selecting/region.prod.e2e-spec.js
+39
-0
39 additions, 0 deletions
e2e/src/selecting/region.prod.e2e-spec.js
src/atlasViewer/atlasViewer.component.ts
+1
-1
1 addition, 1 deletion
src/atlasViewer/atlasViewer.component.ts
with
40 additions
and
1 deletion
e2e/src/selecting/region.prod.e2e-spec.js
0 → 100644
+
39
−
0
View file @
6e5b6e11
const
{
AtlasPage
}
=
require
(
'
../../src/util
'
)
const
{
height
,
width
}
=
require
(
'
../../opts
'
)
describe
(
'
> selecting regions
'
,
()
=>
{
const
duplicatedRegion
=
{
atlas
:
'
Multilevel Human Atlas
'
,
template
:
`ICBM 152 2009c Nonlinear Asymmetric`
,
position
:
[
-
0.256
,
26.028
,
-
11.678
]
}
describe
(
`> when selecting duplicated regions at
${
duplicatedRegion
.
atlas
}
/
${
duplicatedRegion
.
template
}
/
${
JSON
.
stringify
(
duplicatedRegion
.
position
)}
`
,
()
=>
{
it
(
`> when click, should only select a single region`
,
async
()
=>
{
const
newPage
=
new
AtlasPage
()
await
newPage
.
init
()
await
newPage
.
goto
()
await
newPage
.
selectAtlasTemplateParcellation
(
duplicatedRegion
.
atlas
,
duplicatedRegion
.
template
)
await
newPage
.
wait
(
500
)
await
newPage
.
waitForAsync
()
await
newPage
.
execScript
(
`interactiveViewer.viewerHandle.setNavigationLoc(
${
JSON
.
stringify
(
duplicatedRegion
.
position
.
map
(
v
=>
v
*
1
e6
))}
, true)`
)
await
newPage
.
wait
(
500
)
await
newPage
.
cursorMoveTo
({
position
:
[
width
*
3
/
4
,
height
/
4
]
})
await
newPage
.
wait
(
500
)
const
txt
=
await
newPage
.
getText
(
`[floatingMouseContextualContainerDirective]`
)
expect
(
txt
.
indexOf
(
`left`
)).
toBeGreaterThanOrEqual
(
0
)
expect
(
txt
.
indexOf
(
`right`
)).
toBeGreaterThanOrEqual
(
0
)
await
newPage
.
cursorMoveToAndClick
({
position
:
[
width
*
3
/
4
,
height
/
4
]
})
await
newPage
.
wait
(
500
)
await
newPage
.
waitForAsync
()
const
visible
=
await
newPage
.
areVisible
(
`region-menu`
)
expect
(
visible
.
length
).
toEqual
(
1
)
})
})
})
This diff is collapsed.
Click to expand it.
src/atlasViewer/atlasViewer.component.ts
+
1
−
1
View file @
6e5b6e11
...
...
@@ -435,7 +435,7 @@ export class AtlasViewer implements OnDestroy, OnInit, AfterViewInit {
if
(
!
this
.
onhoverSegments
)
return
this
.
store
.
dispatch
(
viewerStateSetSelectedRegions
({
selectRegions
:
this
.
onhoverSegments
selectRegions
:
this
.
onhoverSegments
.
slice
(
0
,
1
)
})
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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