add canvas as a multiple time in already selected option's div
AshishDudhat opened this issue · comments
Ashish Dudhat commented
Hello,
I would use the signature for select base as a multiple select menu.
if i select one option and then second time i select second option it add a canvas in signatur div
i use following code
html
<div #signatures *ngFor="let selected of personArray">
<div *ngIf="selected.flag == true">
<div class="label_signature">
<label>{{selected.name}}</label>
</div>
<!-- <div id="signature"></div> -->
<div id="{{selected.name}}" style="border: 1px solid black; margin: 4%;"></div>
</div>
</div>
javascript
public signObj:any = {};
public signedPersion = [];
public personArray = [];
this.personArray = [
{id:1,name:"abc"},
{id:2,name:"def"},
{id:3,name:"ghi"}
];
for(let i=0; i<this.person.length ;i++){
console.log('name',this.person[i].name)
let personName = this.person[i].name
$(document).ready(e => {
var $sigdiv = $("#"+personName)
var datapair = $sigdiv.jSignature({color:"#000",lineWidth:5})
});
}
Ashish Dudhat commented
plese solve this problem