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

fix: Fix downloading screenshots on the playground. #6025

Merged
merged 2 commits into from
Mar 25, 2022

Conversation

gonfunko
Copy link
Contributor

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

#6023

Proposed Changes

This PR fixes the Download Screenshot command in the workspace contextual menu in the playgrounds.

Behavior Before Change

The contextual menu item had no visible effect and logged an error to the console.

Behavior After Change

A screenshot of the workspace is downloaded.

@gonfunko gonfunko requested a review from a team as a code owner March 24, 2022 15:16
@gonfunko gonfunko requested a review from maribethb March 24, 2022 15:16
@@ -95,7 +95,7 @@ function workspaceToSvg_(workspace, callback, customCss) {
* Download a screenshot of the blocks on a Blockly workspace.
* @param {!Blockly.WorkspaceSvg} workspace The Blockly workspace.
*/
Blockly.downloadScreenshot = function(workspace) {
const downloadScreenshot = function(workspace) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add an eslint-ignore statement to silence this warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just converted it to a function declaration.

@gonfunko gonfunko merged commit ca6e590 into google:develop Mar 25, 2022
@gonfunko gonfunko deleted the download-screenshot branch March 25, 2022 15:27
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