-
Notifications
You must be signed in to change notification settings - Fork 197
Conversation
9f36aca
to
f5bcd85
Compare
Codecov Report
@@ Coverage Diff @@
## master #2017 +/- ##
==========================================
+ Coverage 66.41% 66.56% +0.14%
==========================================
Files 297 297
Lines 26337 26338 +1
Branches 5939 5941 +2
==========================================
+ Hits 17493 17531 +38
+ Misses 8844 8807 -37
Continue to review full report at Codecov.
|
@harpgl-bot retest this please |
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.
Just a minor comment.
textStyleDefinitions?.forEach(element => { | ||
this.m_textStyles.set( | ||
element.name!, | ||
this.createTextElementStyle(element, element.name!) | ||
); | ||
}); | ||
|
||
// Remove obsolete | ||
for (const [name] of this.m_textStyles) { | ||
if ( | ||
textStyleDefinitions.findIndex(definition => { | ||
return definition.name === name; | ||
}) === -1 | ||
) { | ||
this.m_textStyles.delete(name); | ||
} | ||
} |
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.
textStyleDefinitions?.forEach(element => { | |
this.m_textStyles.set( | |
element.name!, | |
this.createTextElementStyle(element, element.name!) | |
); | |
}); | |
// Remove obsolete | |
for (const [name] of this.m_textStyles) { | |
if ( | |
textStyleDefinitions.findIndex(definition => { | |
return definition.name === name; | |
}) === -1 | |
) { | |
this.m_textStyles.delete(name); | |
} | |
} | |
this.m_textStyles.clear(); | |
textStyleDefinitions.forEach(element => { | |
this.m_textStyles.set( | |
element.name!, | |
this.createTextElementStyle(element, element.name!) | |
); | |
}); |
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.
- textStyleDefinitions is always defined in the else branch of the condition statement.
- Why not just clearing the text styles map before adding the new ones. Since we're overwriting with the new text styles, it should be the same.
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.
done
Signed-off-by: Frauke Fritz <frauke.fritz@here.com>
Signed-off-by: Frauke Fritz <frauke.fritz@here.com>
Signed-off-by: Frauke Fritz <frauke.fritz@here.com>
retest this please |
704f39e
to
f421ef5
Compare
retest this please |
Thank you for contributing to harp.gl!
Before requesting a pull request, please remember to check the following documents:
If you are adding new functionality we would highly appreciate if you can describe what is the capability you are adding and even better if you can add some examples. Please also remember to add tests for it.
CI Check
Our bots will check whether your PR can be directly integrated into the mainline. We have some internal integration tests running on the background, our bots will inform you of the next steps and someone from our team will take a look and help if needed!
And please do not forget to sign-off your commit! You can read more about DCO here. But, in short, you just need to use
git commit -s
or append--signoff
when you are committing to the repo.Happy contributing!