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

Mouse edge distance fix #373

Conversation

kurtwaldowski-echelon
Copy link
Contributor

@kurtwaldowski-echelon kurtwaldowski-echelon commented Feb 8, 2022

The wrong variable was used, causing strange behavior when using MouseEdge with distance, for Right and Bottom.

This issue was mentioned here: #263

@davidfig

resolve issues using distance or bottom and right.
@kurtwaldowski-echelon
Copy link
Contributor Author

@davidfig Anything I need to do in order to get this looked over? Thanks!

Copy link

@AjayKoenigArcurve AjayKoenigArcurve left a comment

Choose a reason for hiding this comment

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

LGTM

@AjayKoenigArcurve
Copy link

@davidfig Anything I need to do in order to get this looked over? Thanks!

Totally need this feature in <3
GL

@kurtwaldowski-echelon
Copy link
Contributor Author

kurtwaldowski-echelon commented Jun 22, 2022

👀 🙏 👀

@ribx
Copy link

ribx commented Jul 22, 2022

@davidfig I would also love to see this in! I will build a workaround now (reinitialize the plugin on resize with overwriting worldScreen* in viewport)
@kurtwaldowski-echelon thank you for digging deeper into this!

@ribx
Copy link

ribx commented Jul 22, 2022

@AjayKoenigArcurve @kurtwaldowski-echelon :

There is a nice workaround (worldScreenX = screenX * scale):

    // workaround until https://github.com/davidfig/pixi-viewport/pull/373 is merged
    const oldScale = {x: viewport.scale.x, y: viewport.scale.y}
    viewport.scale = {x: 1, y: 1}
    viewport.plugins.get('mouse-edges')?.resize()
    viewport.scale = oldScale

@kurtwaldowski-echelon
Copy link
Contributor Author

kurtwaldowski-echelon commented Jul 27, 2022

@ribx Thanks for the workaround, I forked but may run with this instead for now!

@kurtwaldowski-echelon
Copy link
Contributor Author

@ribx Thanks for the workaround, I forked but may run with this instead for now!

Confirmed it works on my end as well, thanks for this for the time being.

@davidfig davidfig merged commit e2a4711 into davidfig:master Aug 13, 2022
@davidfig
Copy link
Owner

Thanks!

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.

None yet

4 participants