Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signature Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Electronic Signature Service
Signature Frontend
Commits
a5c1558a
Unverified
Commit
a5c1558a
authored
5 years ago
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Prepare signature placement presetting (
#5
)
parent
7ac50c60
No related branches found
No related tags found
No related merge requests found
Pipeline
#11145
passed
5 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/vpu-pdf-preview.js
+8
-4
8 additions, 4 deletions
src/vpu-pdf-preview.js
src/vpu-qualified-signature-pdf-upload.js
+4
-1
4 additions, 1 deletion
src/vpu-qualified-signature-pdf-upload.js
with
12 additions
and
5 deletions
src/vpu-pdf-preview.js
+
8
−
4
View file @
a5c1558a
...
@@ -109,8 +109,11 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
...
@@ -109,8 +109,11 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
*
*
* @param file
* @param file
* @param isShowPlacement
* @param isShowPlacement
* @param placementData
*/
*/
async
showPDF
(
file
,
isShowPlacement
=
false
)
{
async
showPDF
(
file
,
isShowPlacement
=
false
,
placementData
=
{})
{
// TODO: move signature if placementData was set
console
.
log
(
placementData
);
this
.
isShowPlacement
=
isShowPlacement
;
this
.
isShowPlacement
=
isShowPlacement
;
this
.
isShowPage
=
true
;
this
.
isShowPage
=
true
;
let
reader
=
new
FileReader
();
let
reader
=
new
FileReader
();
...
@@ -130,14 +133,15 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
...
@@ -130,14 +133,15 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
// total pages in pdf
// total pages in pdf
this
.
totalPages
=
this
.
pdfDoc
.
numPages
;
this
.
totalPages
=
this
.
pdfDoc
.
numPages
;
const
page
=
placementData
.
currentPage
||
1
;
// show the first page
// show the first page
await
this
.
showPage
(
1
);
await
this
.
showPage
(
page
);
this
.
isPageLoaded
=
true
;
this
.
isPageLoaded
=
true
;
// fix width adaption after "this.isPageLoaded = true"
// fix width adaption after "this.isPageLoaded = true"
await
this
.
showPage
(
1
);
await
this
.
showPage
(
page
);
};
};
reader
.
readAsBinaryString
(
file
);
reader
.
readAsBinaryString
(
file
);
...
@@ -149,7 +153,7 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
...
@@ -149,7 +153,7 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
* @param page_no
* @param page_no
*/
*/
async
showPage
(
page_no
)
{
async
showPage
(
page_no
)
{
// we need to wait unil the last rendering is finished
// we need to wait un
t
il the last rendering is finished
if
(
this
.
isPageRenderingInProgress
)
{
if
(
this
.
isPageRenderingInProgress
)
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/vpu-qualified-signature-pdf-upload.js
+
4
−
1
View file @
a5c1558a
...
@@ -399,7 +399,10 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
...
@@ -399,7 +399,10 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
console
.
log
(
file
);
console
.
log
(
file
);
// start signature placement process
// start signature placement process
this
.
signaturePlacementInProgress
=
true
;
this
.
signaturePlacementInProgress
=
true
;
await
this
.
_
(
"
vpu-pdf-preview
"
).
showPDF
(
file
,
this
.
queuedFilesPlacementModes
[
key
]
===
"
manual
"
);
await
this
.
_
(
"
vpu-pdf-preview
"
).
showPDF
(
file
,
this
.
queuedFilesPlacementModes
[
key
]
===
"
manual
"
,
this
.
queuedFilesSignaturePlacements
[
key
]);
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment