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

fix: handle negative area results in computeQuadArea #3413

Merged
merged 5 commits into from
Oct 25, 2018

Commits on Oct 15, 2018

  1. fix(computeQuadArea): handle negative area results in computeQuadArea

    This patch fixes a case in which computeQuadArea calculates the area size correctly, but returns the area as a negative number.
    This occurs when DOM.getContentQuads returns quads in a specific order.
    
    E.g. the array: [ { x: 463, y: 68.5 },{ x: 437, y: 68.5 },{ x: 437, y: 94.5 },{ x: 463, y: 94.5 } ] will receive area size of -676.
    zeevrosental committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    9524c3e View commit details
    Browse the repository at this point in the history
  2. fix: handle negative area results in computeQuadArea

    This patch fixes a case in which computeQuadArea calculates the area size correctly, but returns the area as a negative number.
    This occurs when DOM.getContentQuads returns quads in a specific order.
    
    E.g. the array: [ { x: 463, y: 68.5 },{ x: 437, y: 68.5 },{ x: 437, y: 94.5 },{ x: 463, y: 94.5 } ] will receive area size of -676.
    zeevrosental committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    8a4d9c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2018

  1. test(compute_quad_area):

    added a test for the fix in computeQuadArea.
    A rotated element causes the quads to be returned in a different order and to receive a negative area in previous computeQuadArea.
    zeevrosental committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    ddc1f31 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ea1faf View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2018

  1. Configuration menu
    Copy the full SHA
    d3599f3 View commit details
    Browse the repository at this point in the history