Skip to content

Commit

Permalink
Merge pull request kitodo#6236 from thomaslow/refactor-detail-map-and…
Browse files Browse the repository at this point in the history
…-fix-5796

Refactor detail map view, update OpenLayers and remember image zoom
  • Loading branch information
solth authored Nov 5, 2024
2 parents d5189df + faddf2a commit abc71c5
Show file tree
Hide file tree
Showing 12 changed files with 715 additions and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ private void selectMedia(String physicalDivisionOrder, String stripeIndex, Strin
String scrollScripts = "scrollToSelectedTreeNode();scrollToSelectedPaginationRow();";
if (GalleryViewMode.PREVIEW.equals(galleryViewMode)) {
PrimeFaces.current().executeScript(
"checkScrollPosition();initializeImage();metadataEditor.gallery.mediaView.update();" + scrollScripts);
"checkScrollPosition();metadataEditor.detailMap.update();metadataEditor.gallery.mediaView.update();" + scrollScripts);
} else {
PrimeFaces.current().executeScript(scrollScripts);
}
Expand Down
4 changes: 4 additions & 0 deletions Kitodo/src/main/webapp/WEB-INF/resources/css/kitodo.css
Original file line number Diff line number Diff line change
Expand Up @@ -3365,6 +3365,9 @@ Column content
left: 16px;
position: absolute;
top: 16px;
display: flex;
flex-direction: column;
align-items: start;
}

#map .ol-overlaycontainer-stopevent > .ol-zoom.ol-unselectable.ol-control {
Expand All @@ -3386,6 +3389,7 @@ Column content
}

#map .ol-control {
display: inline-block;
background: transparent;
padding: 0;
position: static;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/*eslint new-cap: ["error", { "capIsNewExceptionPattern": "^PF" }]*/
/*eslint complexity: ["error", 10]*/

var metadataEditor = {};
var metadataEditor = metadataEditor || {};

metadataEditor.metadataTree = {

Expand Down Expand Up @@ -1147,7 +1147,7 @@ metadataEditor.shortcuts = {
case "PREVIEW":
initialize();
scrollToSelectedThumbnail();
changeToMapView();
metadataEditor.detailMap.update();
break;
}
}
Expand Down
Loading

0 comments on commit abc71c5

Please sign in to comment.