-
Notifications
You must be signed in to change notification settings - Fork 955
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
Fixed position of documentation.js '//addToMap' tag #857
Conversation
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.
If you can keep the properties below the //addToMap
that would be my preference :)
packages/turf-bezier/index.js
Outdated
* | ||
* //addToMap | ||
* curved.properties = { stroke: '#0f0' }; | ||
* var addToMap = [line, curved] | ||
*/ |
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.
so rather than moving the curved.properties
above the //addToMap
tag, I generally move it to below the var addToMap = [line, curved]
. That benefit of that is that it isn't rendered as part of the code sample (which might potentially confuse people)
So I'd make it look like
* var curved = turf.bezier(line);
*
* //addToMap
* var addToMap = [line, curved];
* curved.properties = { stroke: '#0f0' };
*/
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.
👍 Agreed, so anything that's below//addToMap
is not displayed in the website.
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.
will do! 👍
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.
@DenisCarriere @rowanwins ok the code after addToMap = ...
is not rendered in the map on the website. So what's the purpose of adding properties in the example, which highlight the result on the map, if they are not actually used for the map?
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's two parts, the map which uses the addToMap as a featureCollection with all the properties. The second is the JSDocs example being rendered on the website which does not include the addToMap details.
Most of the extra properties added is to properly visualize the map example.
Hopefully that helps answer your question
Just pushed the latest |
Ok fixed most of the major I've excluded some of the new modules (6 skipped) from the tests since they haven't been added to
|
@rowanwins 👍 Updated the |
Ref. Turf-www #113
Updated
@examples
doc for updating the website