Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador Video
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IIIF
Mirador
Mirador Video
Commits
8706a5ac
Commit
8706a5ac
authored
5 years ago
by
Chris Beer
Browse files
Options
Downloads
Patches
Plain Diff
Provide sr-only viewer info, now that it's used as the section/canvas label
parent
fbb182c9
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/WindowCanvasNavigationControls.test.js
+3
-2
3 additions, 2 deletions
...s__/src/components/WindowCanvasNavigationControls.test.js
src/components/WindowCanvasNavigationControls.js
+2
-1
2 additions, 1 deletion
src/components/WindowCanvasNavigationControls.js
with
5 additions
and
3 deletions
__tests__/src/components/WindowCanvasNavigationControls.test.js
+
3
−
2
View file @
8706a5ac
import
React
from
'
react
'
;
import
{
shallow
}
from
'
enzyme
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
{
WindowCanvasNavigationControls
}
from
'
../../../src/components/WindowCanvasNavigationControls
'
;
import
ViewerInfo
from
'
../../../src/containers/ViewerInfo
'
;
import
ViewerNavigation
from
'
../../../src/containers/ViewerNavigation
'
;
...
...
@@ -35,9 +36,9 @@ describe('WindowCanvasNavigationControls', () => {
)).
toBe
(
true
);
});
it
(
'
renders
nothing
when visible=false
'
,
()
=>
{
it
(
'
renders
only a screen-reader accessibile version
when visible=false
'
,
()
=>
{
wrapper
=
createWrapper
({
visible
:
false
});
expect
(
wrapper
.
matchesElement
(
<
><
/
>
))
.toBe
(
true
)
;
expect
(
wrapper
.
matchesElement
(
<
Typography
variant
=
"
srOnly
"
><
ViewerInfo
/><
/Typography
>
))
.toBe
(
true
)
;
});
it
(
'
sets the proper class/ZoomControls prop dependent on the size/width prop
'
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/components/WindowCanvasNavigationControls.js
+
2
−
1
View file @
8706a5ac
...
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import
PropTypes
from
'
prop-types
'
;
import
classNames
from
'
classnames
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
import
Typography
from
'
@material-ui/core/Typography
'
;
import
ZoomControls
from
'
../containers/ZoomControls
'
;
import
ViewerInfo
from
'
../containers/ViewerInfo
'
;
import
ViewerNavigation
from
'
../containers/ViewerNavigation
'
;
...
...
@@ -26,7 +27,7 @@ export class WindowCanvasNavigationControls extends Component {
classes
,
visible
,
windowId
,
zoomToWorld
,
}
=
this
.
props
;
if
(
!
visible
)
return
(
<
><
/
>
)
;
if
(
!
visible
)
return
(
<
Typography
variant
=
"
srOnly
"
component
=
"
div
"
><
ViewerInfo
windowId
=
{
windowId
}
/></
Typography
>
);
return
(
<
Paper
...
...
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