Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamura196 committed Jun 22, 2024
1 parent 4b60932 commit 8293c8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ export const miradorDisableZoomPlugin = [
component: MiradorDisableZoom,
mapStateToProps: (state, { windowId }) => ({
enabled: getWindowConfig(state, { windowId }).disableZoomEnabled || false,
}),
config: {
translations,
},
})
},
{
// target: 'WindowTopBarPluginMenu',
target: 'WindowTopBarPluginArea',
component: MiradorDisableZoomMenuItem,
mode: 'add',
Expand All @@ -27,5 +23,8 @@ export const miradorDisableZoomPlugin = [
mapStateToProps: (state, { windowId }) => ({
enabled: getWindowConfig(state, { windowId }).disableZoomEnabled || false,
}),
config: {
translations,
},
},
];
3 changes: 2 additions & 1 deletion src/plugins/MiradorDisableZoomMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const MiradorDisableZoomMenuItem = ({
return (
<MiradorMenuButton
onClick={handleClickOpen}
aria-label={enabled ? t('disableZoom') : t('enableZoom')}
aria-label={enabled ? t('enableZoom') : t('disableZoom')}
variant="contained"
color={enabled ? 'primary' : 'default'}
>
{enabled ? <LockIcon /> : <LockOpenIcon />}

</MiradorMenuButton>

);
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = (env, options) => {
output: {
filename: 'demo.js',
path: path.join(__dirname, 'demo/dist'),
publicPath: './'
publicPath: options.mode === "development" ? '/mirador-disable-zoom/' : '/',
},
devServer: {
hot: true,
Expand Down

0 comments on commit 8293c8f

Please sign in to comment.