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

Image export display error #214

Closed
Aerijo opened this issue Feb 20, 2018 · 10 comments
Closed

Image export display error #214

Aerijo opened this issue Feb 20, 2018 · 10 comments

Comments

@Aerijo
Copy link

Aerijo commented Feb 20, 2018

How it appears on the website
screen shot 2018-02-20 at 11 05 10 pm

How it appears on the image created by Export .png
screen shot 2018-02-20 at 11 07 02 pm

As seen in the screenshot, the course I experience this with is MATH2222. My others are fine, even ones with similar box sizes and contents. E.g., a side by side comparison of entries in the same exported image.
screen shot 2018-02-20 at 11 10 01 pm

I guess this could be caused by html2canvas though, so I'm not sure if it can be fixed here.

@EMorf
Copy link
Collaborator

EMorf commented Feb 21, 2018

Interesting. Can you try refreshing the page, then exporting? I thought I fixed this issue but evidently not 😣

@Aerijo
Copy link
Author

Aerijo commented Feb 21, 2018

No luck. I closed the tab, cleared Cookies and other site data and Cached images and files in chrome, and then opened the google search result in a new tab. Making MATH2222 my only class, the exported PNG still overlapped onto the second line in each text box.

@EMorf
Copy link
Collaborator

EMorf commented Feb 21, 2018 via email

@EMorf
Copy link
Collaborator

EMorf commented Feb 21, 2018

@Aerijo It seems that other html2canvas users are having similar issues so it's a library thing. As a temporary fix, you can resize the window width so that the word "Tutorial" appears first on the second line, like this:
image

Then, exporting as a .png should work fine:
timetable 18

I'll raise an issue with the library dev, hopefully this'll get fixed soon.

@Aerijo
Copy link
Author

Aerijo commented Feb 21, 2018

Yes, doing so resolves the issue.

@EMorf EMorf closed this as completed Feb 21, 2018
@phetw
Copy link

phetw commented Feb 22, 2018

still facing this issue

@Aerijo
Copy link
Author

Aerijo commented Feb 22, 2018

@rappad Did resizing the window work as a temporary fix? The issue was closed here because it was caused by an external dependency.

@catmanjan
Copy link
Owner

catmanjan commented Feb 22, 2018 via email

@ngilmore14
Copy link

This issue can also be seen on the documentation page with the navigation word "configuration".
capture

@porzellangott
Copy link

porzellangott commented Apr 13, 2018

Hi,

I have similiar issues. It works fine with Google Chrome. It seems the text bounds are not calcuated correct with IE. Google Chrome supports range bounds and IE doesn't, so it uses wrapper, which is sometimes not correct:

var getWrapperBounds = function getWrapperBounds(node, scrollX, scrollY) {
    var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
    wrapper.appendChild(node.cloneNode(true));
    var parentNode = node.parentNode;
    if (parentNode) {
        parentNode.replaceChild(wrapper, node);
        var bounds = (0, _Bounds.parseBounds)(wrapper, scrollX, scrollY);
        if (wrapper.firstChild) {
            parentNode.replaceChild(wrapper.firstChild, wrapper);
        }
        return bounds;
    }
    return new _Bounds.Bounds(0, 0, 0, 0);
};

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

6 participants