-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(AnnotationEngine) mechanism for drawing polygon with unlimited points #32
Conversation
32e2103
to
55e2dc4
Compare
- Polygons | polylines can have unlimited number of points - Finish polygons | polylines with space keyboard - Finish polygons by clicking on first point
08549ba
to
c843587
Compare
default: | ||
setIsShapeClosed(true); | ||
break; | ||
} |
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.
c'est normal que tu aies deux switch sur shapeType ? Dans le premier, il n'y a pas de default. Egalement, comment tu gères le fait de poser n points pour un polygon ou polyline ?
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.
Dans le premier le default est ligne 117.
Je fais deux switch car chacun a un rôle particulier:
- Switch 1: nombres de points
- Switch 2: forme fermée ou pas.
Question 2:
Donc ligne 154 tu as la méthode isGeometryComplete
qui permet de savoir si la forme est complète. Donc c'est toujours false pour les POLY-trucs.
Les POLY-trucs se complètent avec une action manuelle, on se sert donc des méthodes isGeometryReadyToBeManuallyCompleted
(POLYGON et POLYLINE -> touche espace ou autre) et isPolygonReadyToBeManuallyCompletedByClickOnFirstPoint
(POLYGON only -> clic sur le premier point) pour ça.
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.
arf ça me perturbe d'avoir un default qui n'est pas à la fin x) mais peu importe, laisse tel quel.
Et du coup, oui je comprends bien les deux switch !
case 'POLYLINE': | ||
return false; | ||
} | ||
} |
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.
OK pour les polygon et polyline, c'est juste qu'on ne prend pas en compte le numberOfPoints pour valider la forme, oui ?
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.
yes
No description provided.