From 8f242ad4e5c8bd2536a9d3faed098a75c54efa1b Mon Sep 17 00:00:00 2001 From: Jack Reed <phillipjreed@gmail.com> Date: Tue, 19 Mar 2019 15:21:28 -0600 Subject: [PATCH] bump up scrollbar size used for calculations --- __tests__/src/components/ThumbnailNavigation.test.js | 10 +++++----- src/components/ThumbnailNavigation.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/__tests__/src/components/ThumbnailNavigation.test.js b/__tests__/src/components/ThumbnailNavigation.test.js index fb3136488..4c10fb37c 100644 --- a/__tests__/src/components/ThumbnailNavigation.test.js +++ b/__tests__/src/components/ThumbnailNavigation.test.js @@ -64,7 +64,7 @@ describe('ThumbnailNavigation', () => { expect(setCanvas).toHaveBeenCalledWith('foobar', 0); }); it('sets up calculated width based off of height of area and dimensions of canvas', () => { - expect(renderedGrid.find('.mirador-thumbnail-nav-container').first().prop('style').width).toEqual(93); + expect(renderedGrid.find('.mirador-thumbnail-nav-container').first().prop('style').width).toEqual(90); }); it('renders canvas thumbnails', () => { expect(renderedGrid.find('CanvasThumbnail').length).toBe(3); @@ -108,7 +108,7 @@ describe('ThumbnailNavigation', () => { }); it('style', () => { expect(wrapper.instance().style()).toMatchObject({ height: '150px', width: '100%' }); - expect(rightWrapper.instance().style()).toMatchObject({ height: '100%', width: '122px' }); + expect(rightWrapper.instance().style()).toMatchObject({ height: '100%', width: '131px' }); }); it('rightWidth', () => { expect(wrapper.instance().rightWidth()).toEqual(100); @@ -125,12 +125,12 @@ describe('ThumbnailNavigation', () => { expect(wrapper.instance().rightWidth()).toEqual(200); }); it('calculateScaledWidth', () => { - expect(wrapper.instance().calculateScaledWidth({ index: 0 })).toEqual(93); + expect(wrapper.instance().calculateScaledWidth({ index: 0 })).toEqual(90); expect(rightWrapper.instance().calculateScaledWidth({ index: 0 })).toEqual(100); }); it('calculateScaledHeight', () => { - expect(wrapper.instance().calculateScaledHeight({ index: 0 })).toEqual(140); - expect(rightWrapper.instance().calculateScaledHeight({ index: 0 })).toEqual(132); + expect(wrapper.instance().calculateScaledHeight({ index: 0 })).toEqual(135); + expect(rightWrapper.instance().calculateScaledHeight({ index: 0 })).toEqual(126); }); it('columnCount', () => { diff --git a/src/components/ThumbnailNavigation.js b/src/components/ThumbnailNavigation.js index 29e51540f..459da0acd 100644 --- a/src/components/ThumbnailNavigation.js +++ b/src/components/ThumbnailNavigation.js @@ -21,7 +21,7 @@ export class ThumbnailNavigation extends Component { constructor(props) { super(props); - this.scrollbarSize = 10; + this.scrollbarSize = 15; this.spacing = 16; // 2 * (2px margin + 2px border + 2px padding + 2px padding) this.cellRenderer = this.cellRenderer.bind(this); this.calculateScaledHeight = this.calculateScaledHeight.bind(this); -- GitLab