Skip to content

Commit b41a812

Browse files
committed
Add support for tool bar options
1 parent 4156b38 commit b41a812

21 files changed

+4389
-4394
lines changed

README.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,30 @@ const App = () => {
4343
height: 800,
4444
};
4545
46-
// A local manifest will take precedence over manifestUrl if both props are supplied
46+
// Pass through any OpenSeadragon config options you'd like to override
47+
const openSeadragonOptions = {
48+
gestureSettingsMouse: {
49+
scrollToZoom: true,
50+
}
51+
};
52+
53+
// Customize which tool bar controls are displayed
54+
const toolBarOptions = {
55+
showZoom: true,
56+
showFullScreen: true,
57+
showDownload: true,
58+
showPreviousNext: true,
59+
};
60+
61+
// Note: A local manifest will take precedence over manifestUrl if both props are supplied
4762
return (
48-
<OpenSeadragonViewer manifest={manifest} manifestUrl={manifestUrl} options={options} />
63+
<OpenSeadragonViewer
64+
manifest={manifest}
65+
manifestUrl={manifestUrl}
66+
options,
67+
openSeadragonOptions, // Optional
68+
toolBarOptions // Optional
69+
/>
4970
);
5071
}
5172
@@ -54,27 +75,11 @@ export default App;
5475

5576
### Options / Props
5677

57-
Props the component accepts:
58-
59-
- `manifest` - {object} IIIF manifest
60-
- `manifestUrl` - {string} IIIF manifest url
61-
- `options` - {object} An options config object whether to use custom features or OpenSeadragon features
62-
63-
View [full configuration options](https://samvera-labs.github.io/openseadragon-react-viewer/) and a playground.
78+
View [documentation](https://samvera-labs.github.io/openseadragon-react-viewer/) for all configuration options.
6479

6580
### Custom styling
6681

67-
CSS class names are provided for elements which allow for custom styling overrides.
68-
69-
For example, to change the style of the title in the viewer, in your CSS define something like:
70-
71-
```
72-
.osrv-work-title {
73-
color: green;
74-
font-family: "Verdana";
75-
font-size: 2rem;
76-
}
77-
```
82+
View [documentation](https://samvera-labs.github.io/openseadragon-react-viewer/) for a list of CSS classes you can target to add custom styles.
7883

7984
### Getting help
8085

0 commit comments

Comments
 (0)