Skip to content
Snippets Groups Projects
Commit 9f4239df authored by Chris Beer's avatar Chris Beer
Browse files

line length

parent 290bf0f4
Branches
No related tags found
No related merge requests found
......@@ -30,7 +30,8 @@ describe('MiradorViewer', () => {
});
describe('processConfig', () => {
it('transforms config values to actions to dispatch to store', () => {
instance = new MiradorViewer({
instance = new MiradorViewer(
{
catalog: [
{ manifestId: 'http://media.nga.gov/public/manifests/nga_highlights.json', provider: 'National Gallery of Art' },
],
......@@ -55,7 +56,8 @@ describe('MiradorViewer', () => {
mode: 'add',
target: 'WindowTopBarPluginArea',
}],
});
},
);
const { windows, catalog, config } = instance.store.getState();
const windowIds = Object.keys(windows);
......@@ -74,7 +76,8 @@ describe('MiradorViewer', () => {
expect(config.foo).toBe('bar');
});
it('merges translation configs from multiple plugins', () => {
instance = new MiradorViewer({
instance = new MiradorViewer(
{
id: 'mirador',
},
{
......@@ -102,7 +105,8 @@ describe('MiradorViewer', () => {
target: 'Window',
},
],
});
},
);
const { config } = instance.store.getState();
......
......@@ -86,7 +86,10 @@ export class AnnotationsOverlay extends Component {
this.initializeViewer();
const annotationsUpdated = !AnnotationsOverlay.annotationsMatch(annotations, prevProps.annotations);
const searchAnnotationsUpdated = !AnnotationsOverlay.annotationsMatch(searchAnnotations, prevProps.searchAnnotations);
const searchAnnotationsUpdated = !AnnotationsOverlay.annotationsMatch(
searchAnnotations,
prevProps.searchAnnotations,
);
const hoveredAnnotationsUpdated = (
xor(hoveredAnnotationIds, prevProps.hoveredAnnotationIds).length > 0
......
......@@ -23,7 +23,14 @@ const mapStateToProps = (state, {
annotationId, hit = { annotations: [] }, companionWindowId, windowId,
}) => {
const realAnnoId = annotationId || hit.annotations[0];
const hitAnnotation = getResourceAnnotationForSearchHit(state, { annotationUri: realAnnoId, companionWindowId, windowId });
const hitAnnotation = getResourceAnnotationForSearchHit(
state,
{
annotationUri: realAnnoId,
companionWindowId,
windowId,
},
);
const annotationLabel = getResourceAnnotationLabel(state, { annotationUri: realAnnoId, companionWindowId, windowId });
const selectedCanvasIds = getVisibleCanvasIds(state, { windowId });
......
......@@ -63,7 +63,12 @@ function* fetchIiifResourceWithAuth(url, iiifResource, options, { degraded, fail
}
}
const { error, json, response } = yield call(fetchIiifResource, url, urlOptions, { failure: arg => arg, success: arg => arg });
const { error, json, response } = yield call(
fetchIiifResource,
url,
urlOptions,
{ failure: arg => arg, success: arg => arg },
);
// Hard error either requesting the resource or deserializing the JSON.
if (error) {
......
......@@ -154,7 +154,14 @@ export function* setCurrentAnnotationsOnCurrentCanvas({
const companionWindowIds = Object.keys(searches || {});
if (companionWindowIds.length === 0) return;
const annotationBySearch = yield select(getAnnotationsBySearch, { canvasIds: visibleCanvases, companionWindowIds, windowId });
const annotationBySearch = yield select(
getAnnotationsBySearch,
{
canvasIds: visibleCanvases,
companionWindowIds,
windowId,
},
);
yield all(
Object.keys(annotationBySearch)
......
......@@ -108,7 +108,9 @@ export const getSortedSearchHitsForCompanionWindow = createSelector(
[
getSearchHitsForCompanionWindow,
getCanvases,
(state, { companionWindowId, windowId }) => annotationUri => getResourceAnnotationForSearchHit(state, { annotationUri, companionWindowId, windowId }),
(state, { companionWindowId, windowId }) => (
annotationUri => getResourceAnnotationForSearchHit(state, { annotationUri, companionWindowId, windowId })
),
],
(searchHits, canvases, annotationForSearchHit) => {
if (!canvases || canvases.length === 0) return [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment