-
Notifications
You must be signed in to change notification settings - Fork 523
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
Improve Group shape to allow moving all contained shapes at once. #690
Conversation
d2166d9
to
125f23c
Compare
@DennisBirkholz Could you rebase your PR, and update the changelog and if you Can add some unit tests, it would be perfect ? After that (and a review), I will merge the PR. |
He @Progi1984, I will rebase in the upcoming week and update the changelog and I will try to come up with some meaningful test cases. |
Thanks @DennisBirkholz |
079c5f3
to
e4c7c4f
Compare
@Progi1984: I rebased my pull request, added a change log entry and adjusted the tests for the Group shape (I don't think additional tests are required). If there is anything else I should change, please point it out, thanks. The failing PHPUnit-Test is unrelated to my Pull request. PptChartsTest.php#L778 causes the test failure in case the random call returns 0. |
docs/changes/1.2.0.md
Outdated
@@ -5,6 +5,7 @@ | |||
## Enhancements | |||
|
|||
- `phpoffice/phpspreadsheet`: Allow version 1.9 or 2.0 by [@Progi1984](https://github.com/Progi1984) fixing [#790](https://github.com/PHPOffice/PHPPresentation/pull/790), [#812](https://github.com/PHPOffice/PHPPresentation/pull/812) in [#816](https://github.com/PHPOffice/PHPPresentation/pull/816) | |||
- Group Shape: moving the shape now moves all contained shapes. Offsets and size are calculated based on the contained shapes [#690](https://github.com/PHPOffice/PHPPresentation/pull/690) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Group Shape: moving the shape now moves all contained shapes. Offsets and size are calculated based on the contained shapes [#690](https://github.com/PHPOffice/PHPPresentation/pull/690) | |
- Group Shape: moving the shape now moves all contained shapes. Offsets and size are calculated based on the contained shapes by [@DennisBirkholz](https://github.com/DennisBirkholz) in [#690](https://github.com/PHPOffice/PHPPresentation/pull/690) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DennisBirkholz a small feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small feedback in changelog
OffsetX/Y, ExtentX/Y, Width and Height are always calculated to prevent desync between Group and contained shapes.
e4c7c4f
to
7c2504a
Compare
@Progi1984 Changelog is updated according to your feedback |
@DennisBirkholz Thank you for your contribution 🎇 |
This pull requests modifies the Group container shape so moving it around moves all contained shapes with it.
To make this work reliably all offsets, extents and dimensions are calculated based on the contained shapes and not cached anymore.
I also fixed the Group writing part in the PowerPoint2007 writer which used the extentX/Y methods to get the width and height. (The XML nodes/attributes are named really misleading here)
Thank you for considering this contribution and thank you for your work!