-
Notifications
You must be signed in to change notification settings - Fork 18
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
Adds function to create screenshots #50
Conversation
js/index.js
Outdated
Progress.show({title:"Screenshot done",percent:85,sticky:true}); | ||
|
||
}, err=>{ | ||
showToast("Error creating screenshot: "+err,"error"); |
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! Does this need a Progress.hide(...)
call 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.
Do you mean line 1267? Without that it does not change from animated progress bar to fixed percentages. There might be a better way to do this.
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.
Oh no, I was thinking if we hit an error we could've done Progress.show({title:"Creating screenshot",interval:10,percent:"animate",sticky:true});
, and then no other change to Progress
in this error handler section, if you see what I mean?
That's a great idea - thanks! Please could you add a:
It might be a bit confusing for older Bangle.js owners otherwise |
Do we want to check for the Bangle v1 in this code or would it maybe be cleaner to do that in |
I thought showing/hiding the button might just be extra work. Most users now will be Bangle.js 2, the dialog is just to stop the inevitable complaints :) We only support the 2 bangles, but if there is a bangle 3 it'll probably support screenshots :) I think if EspruinoApps is used with a Pixl.js then you might be able to screenshot that |
Thanks! |
This allows the apploader to get a screenshot via
g.dump()
.