painterro icon indicating copy to clipboard operation
painterro copied to clipboard

backplateImgUrl property nullifies the openImage parameter of .show()

Open Eric-Canas opened this issue 4 years ago • 3 comments

Describe the bug backplateImgUrl property nullifies the openImage parameter of .show()

Painterro version v1.2.58

To Reproduce // secondImageURL does not appears Painterro({backplateImgUrl : imgURL}).show(secondImgURL);

// secondImageURL appears Painterro().show(secondImgURL);

Expected behavior // What happens when: Painterro({/backplateImgUrl : imgURL,/ backgroundFillColorAlpha : 0.0, defaultSize : ${width}x${heigth}}).show(this.secondImgURL);

let sheet = window.document.styleSheets[0]; sheet.insertRule(.ptro-center-tablecell { background-image: url("${imgURL}"); background-repeat : no-repeat; background-position: center center; background-size = ${width}px ${height}px}, sheet.cssRules.length);

Screenshots When I draw it, over this image image And I save with the saveHandler the secondImgURL, I can continue with my draw the next time I open painterro with the code in Expected behavior. image

However, when I simply apply this: **Painterro({backplateImgUrl : imgURL}).show(secondImgURL); ** secondImgURL does not charge: image

Browser Google Chrome version 92.0.4515.131 on Windows

Eric-Canas avatar Aug 13 '21 19:08 Eric-Canas

@Eric-Canas Hola Eric!

Yepp, seems like the options are antagonistic for now, even did not think about use case when both could be used.

Just to clarify expected behaviour: we want to show image on top of the backplate image:

image

@Darktimeoff how do you think, how hard will it be to adjust the current implementation?

ivictbor avatar Aug 16 '21 19:08 ivictbor

@Eric-Canas could you please clarify whther I understood you right by checking image above?

ivictbor avatar Dec 12 '21 15:12 ivictbor

Yes, yes! Totally. What you said is totally right.

Eric-Canas avatar Dec 12 '21 17:12 Eric-Canas