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

Handle More Configurable Parts of CONFIG #2911

Open
LukeAbby opened this issue Nov 3, 2024 · 4 comments
Open

Handle More Configurable Parts of CONFIG #2911

LukeAbby opened this issue Nov 3, 2024 · 4 comments

Comments

@LukeAbby
Copy link
Collaborator

LukeAbby commented Nov 3, 2024

There is code like this:

  #createGroups(parentName, parent) {
    for ( const [name, config] of Object.entries(CONFIG.Canvas.groups) ) {
      if ( config.parent !== parentName ) continue;
      const group = new config.groupClass();
      Object.defineProperty(this, name, {value: group, writable: false});    // Reference on the Canvas
      Object.defineProperty(parent, name, {value: group, writable: false});  // Reference on the parent
      parent.addChild(group);
      this.#createGroups(name, group);                                       // Recursive
    }
  }

Which means everything under Config.Canvas.groups has profound effect on typing now, in a similar fashion to how Documents can be configured.

@JPMeehan
Copy link
Collaborator

JPMeehan commented Nov 5, 2024

Tied to #2572

@JPMeehan
Copy link
Collaborator

JPMeehan commented Nov 6, 2024

Also tied to #2593

@JPMeehan
Copy link
Collaborator

JPMeehan commented Nov 8, 2024

Thought: We move all of the layer definitions to an interface that Canvas extends, and then that interface can get some clean declaration merging.

@esheyw
Copy link
Contributor

esheyw commented Nov 15, 2024

A shorthand for access to CONFIG.Canvas.rulerClass would be convenient to have

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

No branches or pull requests

3 participants