Skip to content

Commit

Permalink
v1.3.11 Bug Corrections in the Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
adizanni committed Mar 19, 2022
1 parent 5f17088 commit a984e55
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dist/floor3d-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "floor3d-card",
"version": "1.3.10-hf1",
"version": "1.3.11",
"description": "Lovelace floor3d-card",
"keywords": [
"home-assistant",
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CARD_VERSION = '1.3.10-hf1';
export const CARD_VERSION = '1.3.11';
6 changes: 2 additions & 4 deletions src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export class Floor3dCardEditor extends LitElement implements LovelaceCardEditor
></ha-icon>
</div>
<div class="values" style="flex-grow: 1;">
${this._entity_ids.length < 40
${(this._entity_ids.length * this._configArray.length) < 5000
? html` <floor3d-select
label="Entity (Required)"
.value=${config.entity}
Expand Down Expand Up @@ -2107,9 +2107,7 @@ export class Floor3dCardEditor extends LitElement implements LovelaceCardEditor
const config = this._configArray[index];
const visible: boolean = config.type3d ? config.type3d === 'cover' : false;
if (visible) {
if (!config.cover) {
Object.defineProperty(config, 'cover', { configurable: true, writable: true });
}
config.cover = { ...config.cover };
}
return html`
${visible
Expand Down
4 changes: 4 additions & 0 deletions src/floor3d-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,7 @@ export class Floor3dCard extends LitElement {
this._levels = [];
this._raycasting = [];
this._raycastinglevels = [];
//TODO: explore solution with layers

console.log('Found level 0');

Expand Down Expand Up @@ -2574,10 +2575,12 @@ export class Floor3dCard extends LitElement {
private _updatehide(item: Floor3dCardConfig, index: number): void {
// hide the object when the state is equal to the configured value
this._object_ids[index].objects.forEach((element) => {
//object clickable: check layers solution
const _object: any = this._scene.getObjectByName(element.object_id);

if (_object) {
if (this._states[index] == item.hide.state) {
//TODO: Layers to hide ?
_object.visible = false;
} else {
_object.visible = true;
Expand All @@ -2596,6 +2599,7 @@ export class Floor3dCard extends LitElement {
if (this._states[index] == item.show.state) {
_object.visible = true;
} else {
//TODO: Layers to hide ?
_object.visible = false;
}
}
Expand Down

0 comments on commit a984e55

Please sign in to comment.