-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added promise returns to Plotly.___ #77
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
Conversation
@@ -1640,7 +1650,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) { | |||
} | |||
else { | |||
console.log('restyle fail',astr,val,traces); | |||
return; | |||
return new Promise.reject(); |
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.
🎉
Nice. Let's get a test case in |
|
||
Plotly.addTraces(gd, [{'name': 'c'}, {'name': 'd'}]); | ||
expect(gd).toEqual(expected); | ||
expect(gd.data).toEqual(expectedData); |
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.
FYI @bpostlethwaite no need to check the whole gd
, just checking its data is more than enough here.
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.
nice catch, agreed!
💃 |
Added promise returns to Plotly.___
Added promise returns for exposed methods in
plot_api.js
, and they will all be sent along with the gd.#76
Tests on
npm run test-image
are not passing on my machine, but let's see if they pass on circle!