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

RTL Support #88

Open
sanadnajjar opened this issue Jun 21, 2022 · 3 comments · May be fixed by #103
Open

RTL Support #88

sanadnajjar opened this issue Jun 21, 2022 · 3 comments · May be fixed by #103
Labels
bug Something isn't working.

Comments

@sanadnajjar
Copy link

Describe the bug
when the website or mobile is on rtl the confetti doesnt appear.

To Reproduce
in html tag add dir="rtl"
fire confetti event

You can try on https://party.js.org/ example template

Expected behavior
confetti should appear when an event is fired whether its ltr or rtl

@sanadnajjar
Copy link
Author

@yiliansource is there a solution for this?

@yiliansource
Copy link
Owner

Hi, sorry, uni exams got the better of me.

I'll have to look into this, I'm not too familiar with the effects of dir="rtl". I'll let you know what I'll come up with.

@yiliansource yiliansource added the bug Something isn't working. label Nov 10, 2022
@yuval-herman
Copy link

My solution was to put the rtl property on the text div directly. The most simple solution for this would be to add dir="ltr" to the div containing the canvas element directly in the library, this should not have any effect for ltr sites as far as I can tell.
For now, here is a code snippet to fix this for anyone else, just paste it anywhere...

party.forceInit()
setTimeout(
() =>
	document
		.getElementById("party-js-container")
		.setAttribute("dir", "ltr"),
500
)

This is obviously very crude but it works for me, I might open a fix pr later.

yuval-herman added a commit to yuval-herman/party-js that referenced this issue May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants