Skip to content

Conversation

@archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 5, 2020

@plotly/plotly_js

@archmoj archmoj added this to the v1.58.0 milestone Nov 5, 2020

lib.strTranslate = function(x, y) {
return (x || y) ? 'translate(' + x + ',' + y + ')' : '';
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be able to simplify even more with an optional 3rd argument which is the number of digits to round to - would remove the Math.round and toFixed you have in a few places.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Nice simplification! 💃

@archmoj archmoj merged commit c09fe29 into master Nov 5, 2020
@archmoj archmoj deleted the lib-transform-funcs branch November 5, 2020 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants