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

Canvas#_onDragLeftStart checks active layer by exact constructor name #6562

Closed
aaclayton opened this issue Jan 19, 2022 · 0 comments
Closed
Assignees
Labels
bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @stwlam

Environment Details

  • Foundry VTT Version: 9.242
  • Operating System: Linux (Debian 11)
  • How Are You Using Foundry: Native Application (Electron)
  • Which Game System: any
  • Modules Enabled?: no

Issue Description

Canvas#_onDragLeftStart has a line checking for whether the active layer is the token layer. It fails if a TokenLayer subclass is configured due to an exact constructor name check:

  _onDragLeftStart(event) {

    // Extract event data
    const layer = this.activeLayer;
    const isRuler = game.activeTool === "ruler";
    // ▼ "TokenLayerPF2e" due to CanvasLayer#name getter ▼
    const isCtrlRuler = game.keyboard.isModifierActive(KeyboardManager.MODIFIER_KEYS.CONTROL) && (layer.name === "TokenLayer"); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants