Skip to content

Commit

Permalink
Return null from documentCollection() to avoid rendering all Drawings…
Browse files Browse the repository at this point in the history
… in scene.
  • Loading branch information
mcglincy committed Jul 6, 2024
1 parent eadb134 commit baee67e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/dungeondraw-bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/dungeondraw-bundle.min.js.map

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions src/dungeonlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,22 @@ function createDataOffsetPoints(createData) {
export class DungeonLayer extends PlaceablesLayer {
static LAYER_NAME = "dungeon";

// TODO: figure out what documentName / embeddedName / type we should be using
/** @inheritdoc */
static documentName = "Drawing";

constructor() {
super();
this.dungeon = null;
}

get documentCollection() {
// avoid returning all Drawings in the scene, as we
// don't want DungeonLayer to draw them during draw().
// TODO: we need to stop re-using Drawing for the documentName.
return null;
}

/** @inheritdoc */
static get layerOptions() {
return foundry.utils.mergeObject(super.layerOptions, {
Expand All @@ -126,10 +137,6 @@ export class DungeonLayer extends PlaceablesLayer {
});
}

// TODO: figure out what documentName / embeddedName / type we should be using
/** @inheritdoc */
static documentName = "Drawing";

/**
* Get initial data for a new drawing.
* Start with some global defaults, apply user default config, then apply mandatory overrides per tool.
Expand Down

0 comments on commit baee67e

Please sign in to comment.