-
Notifications
You must be signed in to change notification settings - Fork 80
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
Prevent division by zero #9
base: master
Are you sure you want to change the base?
Conversation
Great change, thank you! It would be awesome to see it merged on FSInteractiveMap. |
@@ -45,6 +45,47 @@ - (void)setDefaultParameters | |||
|
|||
#pragma mark - SVG map loading | |||
|
|||
- (void)loadMap:(NSString*)mapName forSize:(CGSize)size withColors:(NSDictionary*)colorsDict { |
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.
There is a log of duplication in that method from - (void)loadMap:(NSString*)mapName withColors:(NSDictionary*)colorsDict. Can you try to factor it?
Hello, i need to show the name of the province on the map in China, what do i need to do? |
@ArthurGuibert can this PR being merged? Or at least have another PR with those lines?
Happy to do it and help. Without this fix it crashes. |
Made a change to prevent a division by zero when there is only one value in the datas or one color.