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

Object cropping if its larger than canvas bounds #17

Closed
adrianolobo opened this issue Dec 19, 2018 · 4 comments
Closed

Object cropping if its larger than canvas bounds #17

adrianolobo opened this issue Dec 19, 2018 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@adrianolobo
Copy link

adrianolobo commented Dec 19, 2018

Hi,

I'm creating paper Scroll like background with a height that varies according to the content using nineslice plugin.
So if the content is larger than the screen size I create a scroll behavior, but all the offbounds parts of this background is being cropped.

image

this is the bottom part that is being cropped

image

@jdotrjs
Copy link
Owner

jdotrjs commented Jan 4, 2019

Hm.

Can you give me a little more info on how you're drawing the contents of the dialog? I don't have any support in place right now to crop just to the center area though that seems a reasonable feature request.

The thing that confuses me, and why I need more info, is why you might be seeing only the bottom bit get drawn over the nineslice. I would expect leaking from both top and bottom based on what you describe.

@jdotrjs jdotrjs added enhancement New feature or request question Further information is requested labels Jan 4, 2019
@adrianolobo
Copy link
Author

Hi,

Sorry, I think I was not very clear, its actually not an enhancement, I think its a bug.

I created this repository to show the bug: https://github.com/adrianolobo/nineslice-cropping-issue

It's hosted here: https://adrianolobo.github.io/nineslice-cropping-issue/index.html

The first element, the element is larger than the canvas by 20px, notice the right side being cropped

The second element is larger than the canvas by 10px, but its scale by 0.5, notice that it still cropping the right side.

The third element an normal element just for comparison.

The scene file: https://github.com/adrianolobo/nineslice-cropping-issue/blob/master/Scene1.js

Ps. Sorry for the delay in the response, I was in vacation, im back now

@adrianolobo
Copy link
Author

I dug into the code and discovered that it's actually a Phaser bug, and it will be patched in the next release (3.16 i believe)

phaserjs/phaser#4139

Thank you for your time and awesome lib.

@jdotrjs
Copy link
Owner

jdotrjs commented Jan 12, 2019

Oh, yay; thank you! ❤️
Haha, I'm pretty excited I don't have to figure this one out, not gonna lie.

Going to close this as it turned out to be a bug upstream.

@jdotrjs jdotrjs closed this as completed Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants