Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WEBGDE-Components
web-ui
Commits
6aee2a9f
Commit
6aee2a9f
authored
Apr 19, 2023
by
Jorem Magcawas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tiffViewer for refresh
parent
b03cad3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
15 deletions
+7
-15
accessFile.js
WebGde/WebContent/src/accessFile/accessFile.js
+5
-14
tiffViewer.js
WebGde/WebContent/src/tiffViewer/tiffViewer.js
+2
-1
No files found.
WebGde/WebContent/src/accessFile/accessFile.js
View file @
6aee2a9f
...
...
@@ -5,18 +5,13 @@ var gfsFileName;
async
function
accessFile
()
{
var
size
=
0
;
const
elStatus
=
document
.
getElementById
(
'status'
);
function
status
(
text
)
{
elStatus
.
innerHTML
=
text
;
}
//const progressBar = document.getElementById('progressBar');
const
elProgress
=
document
.
getElementById
(
'progress'
);
function
progress
({
loaded
,
total
})
{
function
progress
({
loaded
,
total
})
{
elProgress
.
innerHTML
=
Math
.
round
(
loaded
*
.
000001
)
+
" mb of "
+
Math
.
round
(
total
*
.
000001
);
//progressBar.value = Math.round(loaded / total * 100);
}
...
...
@@ -34,19 +29,15 @@ async function accessFile() {
const
request
=
indexedDB
.
open
(
"ImageDatabase"
,
1
);
request
.
onerror
=
function
(
event
)
{
request
.
onerror
=
function
(
event
)
{
console
.
error
(
"An error occurred with IndexedDB"
);
console
.
error
(
event
);
};
request
.
onupgradeneeded
=
function
()
{
request
.
onupgradeneeded
=
function
()
{
const
db
=
request
.
result
;
const
store
=
db
.
createObjectStore
(
"image"
,
{
keyPath
:
"id"
});
store
.
createIndex
(
"image_address"
,
[
"address"
],
{
unique
:
false
});
const
store
=
db
.
createObjectStore
(
"image"
,
{
keyPath
:
"id"
});
store
.
createIndex
(
"image_address"
,
[
"address"
],
{
unique
:
false
});
};
async
function
main
(
img
)
{
...
...
WebGde/WebContent/src/tiffViewer/tiffViewer.js
View file @
6aee2a9f
...
...
@@ -119,7 +119,8 @@ function TIFFViewer(xhr, TiffViewerImageName) {
if (localStorage.getItem("prev") == 1) {
Current_page = Current_page - 1;
} else {
if(Current_page != localStorage.getItem("display_counter") - 2 || Current_page == 0) {
console.log(Current_page + " | " + localStorage.getItem("display_counter"));
if(localStorage.getItem("submit") == 1 || Current_page == 0) {
Current_page = Current_page + 1;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment