Skip to content
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

Add "save image" button #29

Merged
merged 1 commit into from
Sep 27, 2016
Merged

Add "save image" button #29

merged 1 commit into from
Sep 27, 2016

Conversation

ili3p
Copy link
Contributor

@ili3p ili3p commented Sep 24, 2016

Add a button to the bar that saves the currently displayed image.

@ili3p
Copy link
Contributor Author

ili3p commented Sep 24, 2016

This solves #27

@@ -117,6 +117,12 @@ function Pane(id) {
cloneButton.innerHTML = 'o';
cloneButton.title = 'disconnect';

var saveButton = document.createElement('a');
saveButton.innerHTML = '⤓';
Copy link
Owner

Choose a reason for hiding this comment

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

It'd be nice to have something easier to read. The arrow is rather thin and hard to tell apart.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

saveButton.innerHTML = '⤓';
saveButton.title = 'save';
saveButton.download = 'untitled_image.jpg';
saveButton.href = '';
Copy link
Owner

Choose a reason for hiding this comment

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

We should make it show up only if the content is savable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I wasn't aware that the content can be unsavable. When can this happen? I thought the panes only show up for images and charts.

Copy link
Owner

@szym szym left a comment

Choose a reason for hiding this comment

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

Thanks for this.

@szym szym merged commit 4129d39 into szym:master Sep 27, 2016
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.

2 participants