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
10e8c152
Commit
10e8c152
authored
Jul 13, 2023
by
Lynette Lizardo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented shorcuts
parent
5779ec31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
imageViewer.js
...gets/ImageViewerWidget/modules/imageViewer/imageViewer.js
+37
-7
documentControlWidget.js
...de-Widgets/documentControlWidget/documentControlWidget.js
+4
-0
script.js
WebGde/WebContent/script.js
+0
-0
style.css
WebGde/WebContent/style.css
+1
-0
No files found.
WebGde/WebContent/WebGde-Widgets/ImageViewerWidget/modules/imageViewer/imageViewer.js
View file @
10e8c152
...
...
@@ -21,6 +21,21 @@ export class ImageViewer {
highLightCanvasID
;
highlightObject
;
imageControls
=
{
fitContentButton
:
null
,
flipVerticalButton
:
null
,
flipHorizontalButton
:
null
,
rotateLeftButton
:
null
,
rotateRightButton
:
null
,
zoomInButton
:
null
,
zoomOutBtn
:
null
,
nextPageButton
:
null
,
previousPageButton
:
null
,
refreshButton
:
null
,
previousImageButton
:
null
,
nextImageButton
:
null
}
constructor
(
imageContainerID
)
{
this
.
imageContainerID
=
imageContainerID
;
}
...
...
@@ -42,6 +57,21 @@ export class ImageViewer {
this
.
nextPageButton
.
addEventListener
(
"click"
,
()
=>
{
this
.
nextPageFunction
(
this
.
currentImageObject
)
});
this
.
previousPageButton
.
addEventListener
(
"click"
,
()
=>
{
this
.
previousPageFunction
(
this
.
currentImageObject
)
});
this
.
imageControls
.
fitContentButton
=
document
.
getElementById
(
"fitContentBtn"
);
this
.
imageControls
.
flipVerticalButton
=
document
.
getElementById
(
"flipVerticalBtn"
);
this
.
imageControls
.
flipHorizontalButton
=
document
.
getElementById
(
"flipHorizontalBtn"
);
this
.
imageControls
.
rotateLeftButton
=
document
.
getElementById
(
"leftRotateBtn"
);
this
.
imageControls
.
rotateRightButton
=
document
.
getElementById
(
"rightRotateBtn"
);
this
.
imageControls
.
zoomInButton
=
document
.
getElementById
(
"zoomInBtn"
);
this
.
imageControls
.
zoomOutBtn
=
document
.
getElementById
(
"zoomOutBtn"
);
this
.
imageControls
.
nextPageButton
=
document
.
getElementById
(
"nextPageBtn"
);
this
.
imageControls
.
previousPageButton
=
document
.
getElementById
(
"previousPageBtn"
);
this
.
imageControls
.
refreshButton
=
document
.
getElementById
(
"refreshCurrentImage"
);
this
.
imageControls
.
previousImageButton
=
document
.
getElementById
(
"previousRecordImage"
);
this
.
imageControls
.
nextImageButton
=
document
.
getElementById
(
"nextRecordImage"
);
}
async
addImage
(
imageID
,
imageType
,
imageName
,
imageBlob
)
{
...
...
@@ -196,7 +226,7 @@ export class ImageViewer {
if
(
object
)
{
this
.
nextImageObject
=
object
;
}
else
{
this
.
nextImageObject
=
this
.
currentImageObject
;
this
.
nextImageObject
=
this
.
currentImageObject
;
if
(
document
.
getElementById
(
this
.
nextImageID
))
{
document
.
getElementById
(
this
.
nextImageID
).
remove
();
}
...
...
@@ -262,7 +292,7 @@ export class ImageViewer {
}
document
.
getElementById
(
_this
.
currentImageID
).
childNodes
.
forEach
(
element
=>
{
if
(
!
element
.
classList
.
includes
(
"image"
))
{
if
(
!
element
.
classList
.
includes
(
"image"
))
{
element
.
classList
.
add
(
"image"
);
}
});
...
...
@@ -363,13 +393,13 @@ export class ImageViewer {
console
.
log
(
scale
);
}
const
container
=
document
.
getElementById
(
_this
.
currentImageID
);
if
(
container
.
getAttribute
(
"file-type"
)
!==
"pdf"
)
{
if
(
container
.
getAttribute
(
"file-type"
)
!==
"pdf"
)
{
container
.
childNodes
.
forEach
(
element
=>
{
element
.
classList
.
remove
(
"image"
);
});
}
else
{
}
else
{
container
.
childNodes
.
forEach
(
element
=>
{
if
(
!
element
.
classList
.
includes
(
"image"
))
{
if
(
!
element
.
classList
.
includes
(
"image"
))
{
element
.
classList
.
add
(
"image"
);
}
});
...
...
@@ -382,8 +412,8 @@ export class ImageViewer {
if
(
highlight
)
{
highlight
.
style
.
zoom
=
scale
;
//highlight.style.transform = "scale(" + scale + ")";
// highlight.style.transformOrigin = (scale * 100) + "% " + (scale * 100) + "%";
// highlight.style.transformOrigin = (scale * 100) + "% " + (scale * 100) + "%";
}
});
...
...
WebGde/WebContent/WebGde-Widgets/documentControlWidget/documentControlWidget.js
View file @
10e8c152
...
...
@@ -207,6 +207,10 @@ export class DocumentControlWidget {
return
this
.
global
.
refreshBtn
;
}
getSubmitBtn
(){
return
this
.
global
.
submitBtn
;
}
getPauseBtn
()
{
return
this
.
global
.
pauseBtn
;
}
...
...
WebGde/WebContent/script.js
View file @
10e8c152
This diff is collapsed.
Click to expand it.
WebGde/WebContent/style.css
View file @
10e8c152
...
...
@@ -110,6 +110,7 @@ h3{
#shortcut-popUp
div
table
tr
td
{
border-bottom
:
1px
solid
#fff
!important
;
margin-bottom
:
2px
!important
;
color
:
#fff
;
}
...
...
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