# HG changeset patch # User Sebastien Jodogne # Date 1666947394 -7200 # Node ID ed5a0b9183dcaf0d386cadb45da3fdca65a7c028 # Parent b180233143aee936bab8b5590ee61aa8d8ae8084 The text field with the instance number is editable to go to a specific instance diff -r b180233143ae -r ed5a0b9183dc Applications/StoneWebViewer/NEWS --- a/Applications/StoneWebViewer/NEWS Fri Oct 28 10:38:30 2022 +0200 +++ b/Applications/StoneWebViewer/NEWS Fri Oct 28 10:56:34 2022 +0200 @@ -3,6 +3,7 @@ * Added vertical slider showing position of the current frame inside the series * Display of orientation markers +* The text field with the instance number is editable to go to a specific instance * New configuration options: - "ShowInfoPanelAtStartup" to control the info panel at startup - "ShowUserPreferencesButton" to show the button for setting preferences diff -r b180233143ae -r ed5a0b9183dc Applications/StoneWebViewer/WebApplication/app-fixes.css --- a/Applications/StoneWebViewer/WebApplication/app-fixes.css Fri Oct 28 10:38:30 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/app-fixes.css Fri Oct 28 10:56:34 2022 +0200 @@ -65,3 +65,9 @@ height: 5%; background-color: #00ff00; } + +.wvInputInstanceNumber { + width: 6ch; /* width of 6 characters */ + border: 2px solid rgba(255, 202, 128, 0.24); + background-color: transparent; +} diff -r b180233143ae -r ed5a0b9183dc Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Fri Oct 28 10:38:30 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/app.js Fri Oct 28 10:56:34 2022 +0200 @@ -141,6 +141,7 @@ stone: stone, // To access global object "stone" from "index.html" status: 'waiting', currentFrame: 0, + currentFrameFromUser: 0, numberOfFrames: 0, quality: '', cineControls: false, @@ -158,6 +159,7 @@ }, watch: { currentFrame: function(newVal, oldVal) { + this.currentFrameFromUser = newVal + 1; if (this.cineLoadingFrame) { /** * The "FrameUpdated" event has been received, which indicates @@ -169,6 +171,13 @@ stone.SetFrame(this.canvasId, newVal); } }, + currentFrameFromUser: function(newVal, oldVal) { + if (parseInt(newVal, 10) !== NaN && + newVal >= 1 && + newVal <= this.numberOfFrames) { + this.currentFrame = this.currentFrameFromUser - 1; + } + }, content: function(newVal, oldVal) { this.status = 'loading'; this.cineControls = false; diff -r b180233143ae -r ed5a0b9183dc Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Fri Oct 28 10:38:30 2022 +0200 +++ b/Applications/StoneWebViewer/WebApplication/index.html Fri Oct 28 10:56:34 2022 +0200 @@ -720,7 +720,9 @@ -   {{ currentFrame + 1 }} / {{ numberOfFrames }}   +    + / {{ numberOfFrames }} +