-
Notifications
You must be signed in to change notification settings - Fork 0
Fix des positions des secteurs #60
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
base: master
Are you sure you want to change the base?
Conversation
…n SVG le secteur plutôt qu'en HTML
| if (allGroupsSectors.length === countGroupsSectors) { | ||
| e.target.closest("g").classList.add('active') | ||
| } | ||
| }) |
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.
Pour info @Kern046 j'ai fais en JS vanilla et pas JQuery car l'ajout ou de suppressions de classes ne fonctionne pas en jquery sur l'intérieur des SVG.
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.
T'as raison on va dégager Jquery dès qu'on peut !
| } | ||
| g.active polygon, g.active polygon:hover { | ||
| fill: #1b9448 !important; | ||
| stroke: #34bf68 !important; |
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.
Les !important étaient malheureusement inévitable. Quand je simplifierais le code, je pense qu'il y aura un clean à faire.
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 marche pas de soucis
|
|
||
| return ['left' => $cx, 'top' => $cy]; | ||
| } | ||
| } |
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.
@Kern046 purée merci ChatGPT car je n'aurais pas été capable de le faire. Si on peut la simplifier etc je te laisse voir :)
3b77ec1 to
e9bcda3
Compare
2ba56b3 to
0896301
Compare
Test sur toutes les factions
A noter :
@Kern046 la partie PHP de calcul du centre d'un polygon je ne sais pas faire seul. Je me suis aidé de ChatGPT pour créer la fonction de centrage (Et oui...). Mais si besoin :
https://math.stackexchange.com/questions/1362526/finding-center-of-convex-polygon
Avant :

Après :
