Skip to content

Commit c5a1fc4

Browse files
Fix image loading in OpenSeadragon (#899)
* Fix image loading in OpenSeadragon * chore: bump version to 4.2.19-20260318 [version bump] * Fix bug * Bump version * Bump version --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b0ec64e commit c5a1fc4

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "configure",
3-
"version": "4.2.27-20260319",
3+
"version": "4.2.28-20260319",
44
"homepage": "./configure/build",
55
"private": true,
66
"dependencies": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmgis",
3-
"version": "4.2.27-20260319",
3+
"version": "4.2.28-20260319",
44
"description": "A web-based mapping and localization solution for science operation on planetary missions.",
55
"homepage": "build",
66
"repository": {

src/essence/Basics/UserInterface_/UserInterfaceDefault_.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,8 @@ function windowresize() {
16721672
})
16731673
//The viewer slider
16741674
UserInterface.viewerSplit.css('height', UserInterface.mainHeight + 'px')
1675+
//resize viewer
1676+
if (Viewer_ != null) Viewer_.invalidateSize()
16751677

16761678
//The map screen
16771679
UserInterface.mapScreen.css({

src/essence/Basics/Viewer_/Viewer_.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ var Viewer_ = {
191191
this.imageViewerMap = OpenSeadragon({
192192
id: 'imageViewerMap',
193193
//prefixUrl: 'scripts/external/OpenSeadragon/images/',
194-
defaultZoomLevel: 0.5,
195194
//showNavigationControl: false,
196195
showFullPageControl: false,
197196
zoomInButton: 'osd-zoomin',
@@ -565,6 +564,15 @@ var Viewer_ = {
565564
this.calculateBounds()
566565
this.imageViewerMap.setMaxBounds(this.bounds)
567566
}
567+
if (this.imageViewer != null) {
568+
// Wait a bit for the viewer panel to be visible before updating the image viewer
569+
setTimeout(function () {
570+
Viewer_.imageViewerMap.viewport.fitBounds(
571+
Viewer_.imageViewerMap.viewport.getHomeBounds(),
572+
true
573+
)
574+
}, 10)
575+
}
568576
},
569577
getLastImageId() {
570578
return Viewer_.lastImageId == null ? false : Viewer_.lastImageId

0 commit comments

Comments
 (0)