Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Conversation

@whyvez
Copy link

@whyvez whyvez commented Jun 23, 2016

Add ability to have rgb based colors.

Add ability to have rgb based colors.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 88.235% when pulling cad4427 on tesera:master into 6f99f8d on mapbox:master.

Forgot one change when copy pasted.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 88.235% when pulling e4fbd38 on tesera:master into 6f99f8d on mapbox:master.

if (!markersize.test(properties['marker-size'])) delete properties['marker-size'];
if (!hexcolor.test(properties['marker-color'])) delete properties['marker-color'];
if (properties['marker-color'] && properties['marker-color'][0] !== '#') properties['marker-color'] = '#' + properties['marker-color'];
if (typeof properties['marker-color'] !== 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you don't need the typeof, since you're referring to a property of a defined object. you can write

if (properties['marker-color'] !== undefined) {

Instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants