Skip to content

Conversation

Copy link

Copilot AI commented May 20, 2025

Issue

When using Ctrl+mouse wheel to zoom in the blocks workspace, the zoom increment was too large (approximately 20% per scroll), making it difficult to control and resulting in large, disruptive jumps in zoom level.

Changes

Added a zoom configuration to the blocklyOptions in pxtarget.json with a scaleSpeed of 1.05. This reduces the zoom increment when using Ctrl+mouse wheel in the blocks workspace from approximately 20% to 5% per scroll event.

Before/After

Before: Each mouse wheel tick would change the zoom by approximately 20% (default scaleSpeed of 1.2), making it difficult to control and leading to large jumps in zoom level.

After: Each mouse wheel tick now changes the zoom by only 5%, providing much finer control and a smoother zooming experience that's closer to what a single +/- button click would do.

Implementation

"blocklyOptions": {
    "grid": {
        "spacing": 30,
        "length": 1,
        "colour": "rgb(189, 195, 199)",
        "snap": false
    },
    "zoom": {
        "scaleSpeed": 1.05
    }
}

This is a minimal change that only affects the zoom behavior when using Ctrl+mouse wheel and doesn't impact any other functionality. The modification is consistent with Blockly configuration best practices.

Fixes #6809.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: ssh -oStrictHostKeyChecking=accept-new -o SendEnv=GIT_PROTOCOL [email protected] git-upload-pack '/microsoft/pxt-arcade-sim.git' (packet block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Ctrl + mouse wheel scroll in workspace is too big a zoom jump Reduce zoom increment for Ctrl+mouse wheel in blocks workspace May 20, 2025
Copilot AI requested a review from abchatra May 20, 2025 05:58
Copilot finished work on behalf of abchatra May 20, 2025 05:58
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.

Ctrl + mouse wheel scroll in workspace is too big a zoom jump

2 participants