backplateImgUrl property nullifies the openImage parameter of .show()
Eric-Canas opened this issue · 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
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.
However, when I simply apply this: **Painterro({backplateImgUrl : imgURL}).show(secondImgURL); ** secondImgURL does not charge:
Browser
Google Chrome version 92.0.4515.131 on Windows
@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:
@Darktimeoff how do you think, how hard will it be to adjust the current implementation?
@Eric-Canas could you please clarify whther I understood you right by checking image above?
Yes, yes! Totally. What you said is totally right.