Skip to content

Bugfix/resolution and subimage issues#518

Merged
tkaik merged 19 commits intomasterfrom
bugfix/resolution-and-subimage-issues
Aug 14, 2019
Merged

Bugfix/resolution and subimage issues#518
tkaik merged 19 commits intomasterfrom
bugfix/resolution-and-subimage-issues

Conversation

@Cich0sza
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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