Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Improve responsiveness of or-attribute-history

Robin Dekkersc3d9e1c153f3
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index 0810f09c3..9a81a8814 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -419,18 +419,6 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
--or-attribute-history-controls-margin-children: 0 20px 20px 0;
}
}
-
- @media screen and (max-width: 1500px) {
- #history-controls {
- position: unset;
- margin: 0 auto 10px auto;
- }
-
- or-attribute-history {
- --or-attribute-history-controls-margin: 10px 0 20px 0;
- --or-attribute-history-controls-margin-children: 0 auto 20px auto;
- }
- }
</style>
<div id="history-controls">
<or-input id="history-attribute-picker" value="${historyAttrs[0].name}" .label="${i18next.t("attribute")}" @or-input-changed="${(evt: OrInputChangedEvent) => attributeChanged(evt.detail.value)}" .type="${InputType.SELECT}" .options="${options}"></or-input>
diff --git a/ui/component/or-attribute-history/src/index.ts b/ui/component/or-attribute-history/src/index.ts
index f6b8e186c..843703e11 100644
--- a/ui/component/or-attribute-history/src/index.ts
+++ b/ui/component/or-attribute-history/src/index.ts
@@ -321,7 +321,7 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {
return html`
<div id="container">
<div id="controls">
- <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.interval = evt.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-input>
+ <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("Timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.interval = evt.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-input>
<div id="ending-controls">
<or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.toTimestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>
<or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-left" @click="${() => this._updateTimestamp(this.toTimestamp!, false)}"></or-icon>
diff --git a/ui/component/or-map/src/markers/or-map-marker-asset.ts b/ui/component/or-map/src/markers/or-map-marker-asset.ts
index 2bcaec78b..072349202 100644
--- a/ui/component/or-map/src/markers/or-map-marker-asset.ts
+++ b/ui/component/or-map/src/markers/or-map-marker-asset.ts
@@ -85,9 +85,6 @@ export class OrMapMarkerAsset extends subscribe(manager)(OrMapMarker) {
protected onAssetChanged(asset?: Asset) {
if (asset) {
const attr = Util.getAssetAttribute(asset, AttributeType.LOCATION.attributeName!);
- const showOnMapMeta = Util.getFirstMetaItem(attr, MetaItemType.SHOW_ON_DASHBOARD.urn!);
- if(!showOnMapMeta || !showOnMapMeta.value) return
-
this._updateLocation(attr ? attr.value as GeoJSONPoint : null);
this.type = asset.type;
} else {