Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mirador-video-annotations
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Loïs Poujade
mirador-video-annotations
Commits
8218a6b0
Commit
8218a6b0
authored
Nov 24, 2020
by
Jack Reed
Committed by
Chris Beer
Nov 25, 2020
Browse files
Options
Downloads
Patches
Plain Diff
Update signature of setCanvas fixes #3347
parent
4ded93d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
__tests__/src/components/GalleryViewThumbnail.test.js
+7
-0
7 additions, 0 deletions
__tests__/src/components/GalleryViewThumbnail.test.js
src/components/GalleryViewThumbnail.js
+1
-1
1 addition, 1 deletion
src/components/GalleryViewThumbnail.js
with
8 additions
and
1 deletion
__tests__/src/components/GalleryViewThumbnail.test.js
+
7
−
0
View file @
8218a6b0
...
@@ -62,6 +62,13 @@ describe('GalleryView', () => {
...
@@ -62,6 +62,13 @@ describe('GalleryView', () => {
expect
(
focusOnCanvas
).
toHaveBeenCalled
();
expect
(
focusOnCanvas
).
toHaveBeenCalled
();
});
});
it
(
'
sets the canvas if the user hits a key (non-space or non-enter) while on a canvas
'
,
()
=>
{
const
setCanvas
=
jest
.
fn
();
wrapper
=
createWrapper
({
selected
:
true
,
setCanvas
});
wrapper
.
find
(
'
div[role="button"]
'
).
first
().
simulate
(
'
keyUp
'
,
{
key
:
'
d
'
});
expect
(
setCanvas
).
toHaveBeenCalledWith
(
'
http://iiif.io/api/presentation/2.0/example/fixtures/canvas/24/c1.json
'
);
});
describe
(
'
on-demand annotation fetching
'
,
()
=>
{
describe
(
'
on-demand annotation fetching
'
,
()
=>
{
it
(
'
fetches annotations
'
,
()
=>
{
it
(
'
fetches annotations
'
,
()
=>
{
const
requestCanvasAnnotations
=
jest
.
fn
();
const
requestCanvasAnnotations
=
jest
.
fn
();
...
...
This diff is collapsed.
Click to expand it.
src/components/GalleryViewThumbnail.js
+
1
−
1
View file @
8218a6b0
...
@@ -65,7 +65,7 @@ export class GalleryViewThumbnail extends Component {
...
@@ -65,7 +65,7 @@ export class GalleryViewThumbnail extends Component {
if
(
enterOrSpace
)
{
if
(
enterOrSpace
)
{
focusOnCanvas
();
focusOnCanvas
();
}
else
{
}
else
{
setCanvas
(
canvas
.
index
,
canvas
.
id
);
setCanvas
(
canvas
.
id
);
}
}
}
}
...
...
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