Skip to content

Conversation

@TefDesign
Copy link
Collaborator

@TefDesign TefDesign commented Jun 20, 2024

  • Ajout d'une méthode pour calculer la position central d'un polygon via des coordonnées
  • Ajout du secteur en SVG dans le polygon
  • Clean du code
  • Ajout de la couleur active

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 :
image

Après :
image

image

@TefDesign TefDesign self-assigned this Jun 20, 2024
@TefDesign TefDesign requested a review from Kern046 June 20, 2024 15:21
if (allGroupsSectors.length === countGroupsSectors) {
e.target.closest("g").classList.add('active')
}
})
Copy link
Collaborator Author

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.

Copy link
Collaborator

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;
Copy link
Collaborator Author

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.

Copy link
Collaborator

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];
}
}
Copy link
Collaborator Author

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 :)

@TefDesign TefDesign added the bug label Jun 28, 2024
@Kern046 Kern046 force-pushed the feature/doctrine-orm branch 4 times, most recently from 3b77ec1 to e9bcda3 Compare August 2, 2024 18:17
Base automatically changed from feature/doctrine-orm to feature/remove-daemon-server August 3, 2024 07:30
@Kern046 Kern046 force-pushed the feature/remove-daemon-server branch from 2ba56b3 to 0896301 Compare August 20, 2024 09:50
Base automatically changed from feature/remove-daemon-server to master May 20, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants