Skip to content
Snippets Groups Projects
Commit dafeb35c authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #15729 TIME 1:15 fix signature position block not loaded when not moving it

parent 31b0d6e8
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
[position]="{x: (sign.position.positionX*workingAreaWidth)/100, y:(sign.position.positionY*workingAreaHeight)/100}"
[style.width.%]="25" [ngDraggable]="currentUser===sign.sequence" (movingOffset)="dragging=true"
(endOffset)="moveSign($event, i);" [preventDefaultEvent]="false" [bounds]="myBounds"
[inBounds]="true" class="signature"
[inBounds]="true" class="signature" [class.hide]="!pagesLoaded"
(click)="currentUser!=sign.sequence ? goToSignUserPage(sign.sequence, currentPage) : false">
<ion-buttons style="position: absolute;top: -50px;right: 0px;">
<ion-button fill="clear" slot="icon-only" shape="round" size="small" color="danger"
......@@ -45,6 +45,7 @@
</ion-buttons>
<span class="signUserName">{{getUserName(sign.sequence)}}</span>
{{'lang.signature' | translate | uppercase}}
<p>x = {{sign.position.positionX}}, y = {{sign.position.positionY}}</p>
</div>
</ng-container>
<ion-img class="img-content" [src]="imgContent" (ionImgDidLoad)="imageLoaded($event)"></ion-img>
......@@ -83,4 +84,4 @@
<ion-label>{{'lang.cancel' | translate}}</ion-label>
</ion-button>
</div>
</ion-footer>
\ No newline at end of file
</ion-footer>
......@@ -150,4 +150,8 @@ img {
&-info:hover {
opacity: 1;
}
}
\ No newline at end of file
}
.hide {
display: none;
}
......@@ -22,7 +22,7 @@ export class SignaturePositionComponent implements OnInit {
pages: number[] = [];
currentUser: number = 0;
currentPage: number = 0;
currentPage: number = 1;
currentSignature: any = {
positionX: 0,
positionY: 0
......@@ -35,6 +35,8 @@ export class SignaturePositionComponent implements OnInit {
imgContent: any = null;
load: HTMLIonLoadingElement = null;
pagesLoaded: boolean = false;
constructor(
public translate: TranslateService,
public http: HttpClient,
......@@ -81,6 +83,7 @@ export class SignaturePositionComponent implements OnInit {
const data = await this.pdfViewerService.getPageAsImage(this.currentPage, scale);
this.getImageDimensions(data);
this.imgContent = data;
this.pagesLoaded = true;
}
getImageDimensions(imgContent: any): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment