Skip to content

Commit

Permalink
Editor snapshots: added extra check for mac and ios for allowing scre…
Browse files Browse the repository at this point in the history
…enshots (#10247)

* added extra check for mac and ios for allowing screenshots

* add check for android as well
  • Loading branch information
srietkerk authored Oct 28, 2024
1 parent 7a1012f commit 0088816
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pxtblocks/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ export function flow(ws: Blockly.WorkspaceSvg, opts?: FlowOptions) {
}

export function screenshotEnabled(): boolean {
return !pxt.BrowserUtils.isIE()
const disableForMacIos = pxt.appTarget.appTheme.disableFileAccessinMaciOs && (pxt.BrowserUtils.isMac() || pxt.BrowserUtils.isIOS());
const disableForAndriod = pxt.appTarget.appTheme.disableFileAccessinAndroid && pxt.BrowserUtils.isAndroid();
return !disableForMacIos && !pxt.BrowserUtils.isIE() && !disableForAndriod;
}

export function screenshotAsync(ws: Blockly.WorkspaceSvg, pixelDensity?: number, encodeBlocks?: boolean): Promise<string> {
Expand Down

0 comments on commit 0088816

Please sign in to comment.