Skip to content

Commit

Permalink
🐛 Fix missing extends field in tile layers
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Jul 30, 2020
1 parent 11fe559 commit 9705517
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/riotTags/rooms/room-tile-editor.tag
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ room-tile-editor.room-editor-Tiles.tabbed.tall.flexfix
if (!('tiles' in this.opts.room) || !this.opts.room.tiles.length) {
this.opts.room.tiles = [{
depth: -10,
tiles: []
tiles: [],
extends: {}
}];
}
[this.parent.currentTileLayer] = this.opts.room.tiles;
Expand Down Expand Up @@ -94,7 +95,8 @@ room-tile-editor.room-editor-Tiles.tabbed.tall.flexfix
if (e.inputValue && Number(e.inputValue)) {
var layer = {
depth: Number(e.inputValue),
tiles: []
tiles: [],
extends: {}
};
this.opts.room.tiles.push(layer);
this.parent.currentTileLayer = layer;
Expand All @@ -110,6 +112,9 @@ room-tile-editor.room-editor-Tiles.tabbed.tall.flexfix
};
this.changeTileLayer = e => {
this.parent.currentTileLayer = this.opts.room.tiles[Number(e.target.value)];
if (!this.parent.currentTileLayer.extends) {
this.parent.currentTileLayer.extends = {};
}
this.parent.currentTileLayerId = Number(e.target.value);
};
this.switchTiledImage = () => {
Expand Down

0 comments on commit 9705517

Please sign in to comment.