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

Images dissapear while using Image + text / text + image #113

Open
serokicki opened this issue Nov 9, 2018 · 3 comments
Open

Images dissapear while using Image + text / text + image #113

serokicki opened this issue Nov 9, 2018 · 3 comments

Comments

@serokicki
Copy link

serokicki commented Nov 9, 2018

Hello,

I've found an issue that every click on Image + text/text + Image resets source of those controls.
Function below checks whether we use DynamicImages or not and it either resets our src to "" or replaces with a placeholder.. It happens on each click.
main.js:

            if (isDynamic) {
                var width = sel.props.width.get();
                var height = sel.props.height.get();

                var maxWidth = sel.functions.getMaxWidth();

                if (!width || width === "auto") {
                    sel.props.width.set(maxWidth);
                }
    
                if (!height || height === "auto") {
                    sel.props.height.set(maxWidth);
                }
                
                src("https://via.placeholder.com/" + sel.props.width.get() + "x" + sel.props.height.get());
            } else if (isDynamicPrev !== isDynamic) {
                resetImage();
            }

            isDynamicPrev = isDynamic;
        });

This is how it appears:
I've added couple of image controls and added a random image:
image

Then clicked on first one and last one:
image

Both ended up with src(uknown):
image

Could you please help me with solution for that? Or maybe fast fix?

Thank you in advance.

@agnieszkakowalska
Copy link

@gyulanemeth can you please help?

@gyulanemeth
Copy link
Member

Hello, thanks for reporting, we are going to address this issue in the next release. In the meanwhile please rollback to a previous release.

@gyulanemeth
Copy link
Member

Hello, we have tried to reproduce it several times without any success. Can you please try it again with the newest release?

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

No branches or pull requests

3 participants