Skip to content

TraceShape maxPoses doesn't allow you to set maxPoses to 0 (Infinity). #41

@kauffmanes

Description

@kauffmanes

I made a pull request for this, but the CI build failed due to one of your npm modules (https://travis-ci.org/RobotWebTools/ros2djs/jobs/568488362). I don't want to make any changes to your package.json, so I'm including this issue.

Here's the overview:
To set maxPoses to Infinity, you have to pass a 0 to TraceShape, but when setting this.maxPoses in the TraceShape function, it does this: this.maxPoses = options.maxPoses || 100. If I set maxPoses to 0 (meaning I want it to be infinity) the line of code evaluates it to be a falsy value and sets maxPoses to 100 instead. My code just checks to see if it's defined OR it equals 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions