-
Notifications
You must be signed in to change notification settings - Fork 24
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
Expose setActiveTree and setTreeColorIndex in API #2997
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.
Looking good :) Could you add a small test for the setTreeColorIndex
api function (I think the setActiveTree
function doesn't need a test).
* @example | ||
* api.tracing.setTreeColorIndex(3, 10); | ||
*/ | ||
setTreeColorIndex(treeId?: number, colorIndex: number) { |
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.
Does it make sense to have the first parameter as optional? Calling the function with only one parameter will produce an incorrect result.
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.
Yeah, that's right. I can add it to treeId: ?number
to avoid confusion (even with treeId?
one would have to call setTreeColorIndex(undefined, 3)
to satisfy the interface).
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.
You could also switch the order of parameters
URL of deployed dev instance (used for testing):
Steps to test:
Issues: