Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backplateImgUrl property nullifies the openImage parameter of .show() #152

Open
Eric-Canas opened this issue Aug 13, 2021 · 3 comments
Open

Comments

@Eric-Canas
Copy link

Eric-Canas commented Aug 13, 2021

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

@ivictbor
Copy link
Collaborator

@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
Copy link
Collaborator

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

@Eric-Canas
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants