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

v1.0.0-rc.2 breaks PR #1083 #1919

Open
2 tasks done
ywmail opened this issue Jul 5, 2019 · 2 comments
Open
2 tasks done

v1.0.0-rc.2 breaks PR #1083 #1919

ywmail opened this issue Jul 5, 2019 · 2 comments

Comments

@ywmail
Copy link

ywmail commented Jul 5, 2019

Please follow the general troubleshooting steps first:

  • You are using the latest version
  • You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

v1.0.0-rc.2 breaks PR #1083, v1.0.0-rc.1 is good.

regression made by this:

static fromClientRect(clientRect: ClientRect): Bounds {
return new Bounds(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
}
}
export const parseBounds = (node: Element): Bounds => {
return Bounds.fromClientRect(node.getBoundingClientRect());
};

Specifications:

  • html2canvas version tested with: v1.0.0-rc.3, v1.0.0-rc.2, v1.0.0-rc.1, v1.0.0-rc.0
  • Browser & version:
  • Operating system:
@ywmail
Copy link
Author

ywmail commented Jul 5, 2019

code from v1.0.0-rc.1 is like this:

    static fromClientRect(clientRect: ClientRect, scrollX: number, scrollY: number): Bounds {
        return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
    }
}

export const parseBounds = (node: Element, scrollX: number, scrollY: number): Bounds => {
    return Bounds.fromClientRect(node.getBoundingClientRect(), scrollX, scrollY);
};

@hakimio
Copy link

hakimio commented Jul 13, 2019

Maybe you should create a new pull request with the fix for this regression?

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

2 participants