├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── other-issues.md └── workflows │ ├── ci.yml │ └── main.yml ├── README.md ├── changelog.md ├── css └── style.css ├── docs ├── controlButtons.md ├── img │ ├── .thumb │ │ └── MaterialFoundry.png.jpg │ ├── MaterialFoundry.png │ └── icon.ico ├── index.md ├── moduleSettings │ ├── moduleSettings.md │ ├── sceneConfigurator.md │ └── userConfig.md ├── sceneConfig │ ├── initialViewConfig.md │ └── sceneConfig.md └── style.css ├── img ├── .thumb │ ├── MaterialFoundry2560x1440.jpg.jpg │ ├── MaterialFoundry512x512.png.jpg │ └── parchment.jpg.jpg ├── MaterialFoundry2560x1440.jpg ├── MaterialFoundry512x512.png ├── icons │ ├── .thumb │ │ ├── arrows-alt-solid.png.jpg │ │ ├── compress-arrows-alt-solid.png.jpg │ │ ├── down.png.jpg │ │ └── right.png.jpg │ ├── arrows-alt-solid.png │ ├── compress-arrows-alt-solid.png │ ├── down.png │ └── right.png └── parchment.jpg ├── lang └── en.json ├── lockview.js ├── mkdocs.yml ├── module.json ├── src ├── apps │ ├── initialViewConfig.js │ ├── sceneConfigurator.js │ ├── setViewDialog.js │ └── userConfig.js ├── controlButtons.js ├── helpers.js ├── libWrapper │ ├── overrides.js │ └── shim.js ├── locks.js ├── migrationHandler.js ├── sceneHandler.js ├── settings.js ├── socket.js ├── stylesHandler.js └── viewbox.js └── templates ├── drawingConfig.hbs ├── initialViewConfig.hbs ├── sceneConfig.hbs ├── sceneConfigurator.hbs ├── setViewDialog.hbs └── userConfig.hbs /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: MaterialFoundry 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: materialfoundry 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Setup** 11 | - OS: [e.g. windows] 12 | - Browser: [e.g. chrome, safari, Foundry app] 13 | - Module version: [e.g. 2.0.0] 14 | - Foundry version: [e.g. 13.344] 15 | - Gaming system & version: [e.g. dnd5e 5.0.0] 16 | - Any other modules enabled: [yes/no] 17 | 18 | **Describe the bug** 19 | A clear and concise description of what the bug is. 20 | 21 | **Screenshots** 22 | If applicable, add screenshots to help explain your problem. 23 | 24 | **Console Log** 25 | Please check the console (F12) to see if there are any errors and also include them. 26 | 27 | **Additional context** 28 | Add any other context about the problem here. 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other-issues.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other issues 3 | about: For any other issues 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - Master 6 | - master 7 | - main 8 | permissions: 9 | contents: write 10 | jobs: 11 | deploy: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Configure Git Credentials 16 | run: | 17 | git config user.name github-actions[bot] 18 | git config user.email 41898282+github-actions[bot]@users.noreply.github.com 19 | - uses: actions/setup-python@v4 20 | with: 21 | python-version: 3.x 22 | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 23 | - uses: actions/cache@v3 24 | with: 25 | key: mkdocs-material-${{ env.cache_id }} 26 | path: .cache 27 | restore-keys: | 28 | mkdocs-material- 29 | - run: pip install mkdocs-material 30 | - run: pip install mkdocs-macros-plugin 31 | - run: mkdocs gh-deploy --force -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Release Creation 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | 13 | # get part of the tag after the `v` 14 | - name: Extract tag version number 15 | id: get_version 16 | uses: battila7/get-version-action@v2 17 | 18 | # Substitute the Manifest and Download URLs in the module.json 19 | - name: Substitute Manifest and Download Links For Versioned Ones 20 | id: sub_manifest_link_version 21 | uses: microsoft/variable-substitution@v1 22 | with: 23 | files: 'module.json' 24 | env: 25 | version: ${{steps.get_version.outputs.version-without-v}} 26 | url: https://github.com/${{github.repository}} 27 | manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json 28 | download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip 29 | 30 | # Create a zip file with all files required by the module to add to the release 31 | - run: zip -r ./module.zip lockview.js module.json README.md changelog.md img/ lang/ src/ templates/ css/ 32 | 33 | # Create a release for this specific version 34 | - name: Update Release with Files 35 | id: create_version_release 36 | uses: ncipollo/release-action@v1 37 | with: 38 | allowUpdates: true # Set this to false if you want to prevent updating existing releases 39 | name: ${{ github.event.release.name }} 40 | draft: ${{ github.event.release.unpublished }} 41 | prerelease: ${{ github.event.release.prerelease }} 42 | token: ${{ secrets.GITHUB_TOKEN }} 43 | artifacts: './module.json, ./module.zip' 44 | tag: ${{ github.event.release.tag_name }} 45 | body: ${{ github.event.release.body }} 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lock View 2 | ## Introduction 3 | 4 | Lock View is a [Foundry VTT](https://foundryvtt.com/) module that gives the GM (or a designated player) control over the zoom and pan capabilities of players, such as locking the zoom or pan, moving the canvas, or setting the view to a specified setting. 5 | The module was originally made as a companion app for the [Material Plane](https://github.com/CDeenen/MaterialPlane) module, and to make in-person play using a horizontally mounted TV easier. 6 | Over time, however, the module's features have expanded greatly, including many functions that can be useful for online play. 7 | 8 | The module has 6 main functions: 9 | * **Autoscaling**: Scales the scene in various ways (horizontal fit, vertical fit, automatic fit, or scaled to a physical gridsize) 10 | * **Zoom lock**: Locks the zooming of the scene 11 | * **Pan lock**: Locks the panning of the scene 12 | * **Bounding box**: Limit zoom and pan to stay within a bounding box 13 | * **Force initial view**: After loading a new scene, the view is forced to the initial view (as set in the scene configuration menu), regardless of the position of tokens 14 | * **Viewbox**: Allows the GM to see what's shown on players screens, and allows the GM to control the pan and zoom of those players 15 | 16 | ## Instructions 17 | * [Wiki](https://github.com/CDeenen/LockView/wiki) 18 | 19 | ## Module Compatibility 20 | When 'Zoom Lock' or 'Pan Lock' are enabled, this module disables all zooming and/or panning functionality, regardless of who or what is requesting that zoom or pan. This means that, for example, modules that try to pan or zoom won't work.
21 |
22 | Right now, there appear to be compatibility issues with the following modules: 23 | * DF Active Lights 24 | * DF Curvy Walls 25 | * Zoom/Pan Options 26 | 27 | ## Foundry Compatibility 28 | This module has been tested to work with Foundry V11 and V12.
29 | 30 | ## Feedback 31 | Feel free [report an issue/suggestion](https://github.com/CDeenen/LockView/issues), contact me on Discord (Cris#6864), or send me an email: cdeenen@outlook.com. 32 | 33 | ## Credits 34 | **Author**: Cristian Deenen (Cris#6864 on Discord) 35 | 36 | If you enjoy using my modules, please consider supporting me on [Patreon](https://www.patreon.com/materialfoundry) or buy me a coffee through [Ko-fi](https://ko-fi.com/materialfoundry). 37 | 38 | ## Abandonment 39 | Abandoned modules are a (potential) problem for Foundry, because users and/or other modules might rely on abandoned modules, which might break in future Foundry updates.
40 | I consider this module abandoned if all of the below cases apply: 41 | * This module/github page has not received any updates in at least 3 months 42 | * I have not posted anything on "the Foundry" and "the League of Extraordinary Foundry VTT Developers" Discord servers in at least 3 months 43 | * I have not responded to emails or PMs on Discord in at least 1 month 44 | * I have not announced a temporary break from development, unless the announced end date of this break has been passed by at least 3 months 45 | 46 | If the above cases apply (as judged by the "League of Extraordinary Foundry VTT Developers" admins), I give permission to the "League of Extraordinary Foundry VTT Developers" admins to assign one or more developers to take over this module, including requesting the Foundry team to reassign the module to the new developer(s).
47 | I require the "League of Extraordinary Foundry VTT Developers" admins to send me an email 2 weeks before the reassignment takes place, to give me one last chance to prevent the reassignment.
48 | I require to be credited for my work in all future releases. 49 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ### v2.0.0 4 | The module has been completely rewritten, so new bugs are to be expected. 5 | Compatible with Foundry v13, dropped compatibility with Foundry v12. 6 | 7 | Additions: 8 | 19 | 20 | Removals: 21 | 24 | 25 | Other: 26 | 30 | 31 | ### v1.5.9 - 11-10-2023 32 | Fixes: 33 | 38 | 39 | ### v1.5.8 - 14-09-2023 40 | Fixes: 41 | 45 | 46 | ### v1.5.7 - 14-06-2023 47 | Fixes: 48 | 51 | 52 | ### v1.5.6 - 14-06-2023 53 | Additions: 54 | 59 | 60 | Fixes: 61 | 66 | 67 | Other: 68 | 72 | 73 | ### v1.5.4 - 14-09-2022 74 | Fixes: 75 | 80 | 81 | ### v1.5.3 - 31-08-2022 82 | 83 | Additions: 84 | 89 | 90 | Other: 91 | 95 | 96 | ### v1.5.2 - 22-03-2022 97 | Fixes: 98 | 101 | 102 | ### v1.5.1 - 22-03-2022 103 | Fixes: 104 |