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

Bugfix/resolution and subimage issues #518

Merged
merged 19 commits into from
Aug 14, 2019

Conversation

Cich0sza
Copy link
Contributor

@Cich0sza Cich0sza commented Aug 8, 2019

Fixed bug in Resolution Modifier

Description

When user did not set height parameter, it is calculated automatically. To prevent error, minimum height is set to 1px, when site height is 0px.

Motivation and Context

Closes #384

Screenshots (if appropriate)

Upgrade notes (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have reviewed (and updated if needed) the documentation regarding this change

I hereby agree to the terms of the AET Contributor License Agreement.

if (point.getY() + height > fullImg.getHeight()) {
height = fullImg.getHeight() - point.getY();
}
if (point.getX() + width == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that instead of those 2 if's, we can change if above to:
width = Math.max(1, fullImg.getWidth() - point.getX() (same for height)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done ;)

</urls>
</test>

<test name="S-comparator-Layout-Auto-Height-0px-Page">
Copy link
Contributor

@plutasnyy plutasnyy Aug 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure but with a change in integration tests you should also update https://github.com/Cognifide/aet/blob/master/integration-tests/sanity-functional/src/test/resources/features/filtering.feature or/and https://github.com/Cognifide/aet/blob/master/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java

I remember that documentation contains some tutorial on how to run these tests but unfortunately I cannot find it :P

Copy link
Contributor

@plutasnyy plutasnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ;)

@tkaik tkaik merged commit 77dba03 into master Aug 14, 2019
@tkaik tkaik deleted the bugfix/resolution-and-subimage-issues branch August 14, 2019 15:19
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

Successfully merging this pull request may close these issues.

Collector hangs when auto height feature sets the height to 0
3 participants