diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map.ts index 003d8e379e..805e7b06c2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map.ts @@ -201,6 +201,7 @@ export abstract class TbMap { parentElement.removeChild(content); parentElement.style.display = 'none'; this.containerElement.append(content); + this.timeLineComponent.panelElement = content as Element; } const setup = [this.doSetupControls()]; if (this.timeline && this.settings.tripTimeline.snapToRealLocation) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/panels/map-timeline-panel.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/maps/panels/map-timeline-panel.component.html index 7a725e48eb..41f79eba1f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/panels/map-timeline-panel.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/panels/map-timeline-panel.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -
+
@if(hasData) { { + this.resize(); + }); + this.panelResize$.observe(element); + } + + get panelElement(): Element { + return this.panelElementVal; + } + @Input() anchors: number[] = []; @Output() timeChanged = new EventEmitter(); + column = false; + timestampFormat: DateFormatProcessor; minTimeIndex = 0; @@ -112,6 +128,9 @@ export class MapTimelinePanelComponent implements OnInit { private maxValue: number; private currentTimeValue: number = null; + private panelResize$: ResizeObserver; + private panelElementVal: Element; + constructor(public element: ElementRef, private cd: ChangeDetectorRef, private destroyRef: DestroyRef, @@ -126,6 +145,12 @@ export class MapTimelinePanelComponent implements OnInit { this.speed = this.settings.speedOptions[0]; } + ngOnDestroy() { + if (this.panelResize$) { + this.panelResize$.disconnect(); + } + } + public onIndexChange(index: number) { this.index = index; this.updateCurrentTime(); @@ -208,6 +233,15 @@ export class MapTimelinePanelComponent implements OnInit { } } + private resize(): void { + const width = this.panelElement.getBoundingClientRect().width; + const column = width <= 400; + if (this.column !== column) { + this.column = column; + this.cd.markForCheck(); + } + } + private updateCurrentTime() { const newTime = this.minValue + this.index * this.settings.timeStep; if (this.currentTime !== newTime) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-pattern-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-pattern-settings.component.html index 7912c1aeb5..93ec63c128 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-pattern-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/data-layer-pattern-settings.component.html @@ -21,7 +21,7 @@ [disabled]="!patternSettingsFormGroup.get('show').value"> -
+
{{ patternTitle ? patternTitle : ((patternType === 'label' ? 'widgets.maps.data-layer.label' : 'widgets.maps.data-layer.tooltip') | translate) }} @@ -64,19 +64,23 @@ {{ 'widgets.maps.data-layer.auto-close-tooltips' | translate }}
-
+
widgets.maps.data-layer.tooltip-offset
-
-
widgets.maps.data-layer.tooltip-offset-horizontal
- - - -
widgets.maps.data-layer.tooltip-offset-vertical
- - - +
+
+
widgets.maps.data-layer.tooltip-offset-horizontal
+ + + +
+
+
widgets.maps.data-layer.tooltip-offset-vertical
+ + + +
-
+
{{ 'widget-config.datasource' | translate }}
{{ datasourceTypesTranslations.get(type) | translate }} @@ -71,7 +71,7 @@
-
+
@if (dataLayerType === 'markers') {
{{ 'widgets.maps.data-layer.marker.marker' | translate }}
} @else { @@ -198,11 +198,11 @@ -
+
widgets.maps.data-layer.marker.shape
-
+
widgets.maps.data-layer.marker.icon
@@ -210,7 +210,7 @@
widgets.maps.data-layer.marker.image
-
+
widgets.maps.data-layer.marker.marker-offset
widgets.maps.data-layer.marker.offset-horizontal
@@ -225,7 +225,7 @@
-
+
{{ 'widgets.maps.data-layer.marker.rotate-marker' | translate }} @@ -289,9 +289,9 @@ -
-
widgets.maps.data-layer.path.decorator-symbol
-
+
+
widgets.maps.data-layer.path.decorator-symbol
+
@@ -299,34 +299,42 @@ - - - px - - - +
+ + + px + + + +
-
+
widgets.maps.data-layer.path.decorator-arrangement
-
-
widgets.maps.data-layer.path.decorator-offset
- - -
px
-
-
widgets.maps.data-layer.path.decorator-end-offset
- - -
px
-
-
widgets.maps.data-layer.path.decorator-repeat
- - -
px
-
+
+
+
widgets.maps.data-layer.path.decorator-offset
+ + +
px
+
+
+
+
widgets.maps.data-layer.path.decorator-end-offset
+ + +
px
+
+
+
+
widgets.maps.data-layer.path.decorator-repeat
+ + +
px
+
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layer-row.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layer-row.component.scss index 2081bc6dbf..1f17c05f82 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layer-row.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layer-row.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import '../../../../../../../../../scss/constants'; + .tb-form-table-row.tb-map-data-layer-row { .tb-source-field { @@ -26,18 +28,47 @@ .tb-x-pos-field { flex: 1 1 25%; + min-width: 0; } .tb-y-pos-field { flex: 1 1 25%; + min-width: 0; } .tb-key-field { flex: 1 1 50%; + min-width: 0; } .tb-remove-button { width: 40px; min-width: 40px; } + + @media #{$mat-lt-lg} { + .tb-source-field { + flex-direction: column; + flex: 1 1 30%; + } + .tb-x-pos-field, .tb-y-pos-field { + flex: 1 1 35%; + } + .tb-key-field { + flex: 1 1 70%; + } + } + @media screen and (min-width: 450px) and (max-width: 599px) { + .tb-source-field { + flex-direction: row; + } + } + @media #{$mat-xs} { + .tb-x-pos-field, .tb-y-pos-field { + display: none; + } + .tb-key-field { + display: none; + } + } } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layers.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layers.component.scss index 5bd8618b79..84262b9810 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layers.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-layers.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import '../../../../../../../../../scss/constants'; + .tb-map-data-layers { .tb-form-table-header-cell { &.tb-source-header { @@ -31,6 +33,25 @@ width: 80px; min-width: 80px; } + @media #{$mat-lt-lg} { + &.tb-source-header { + flex: 1 1 30%; + } + &.tb-x-pos-header, &.tb-y-pos-header { + flex: 1 1 35%; + } + &.tb-key-header { + flex: 1 1 70%; + } + } + @media #{$mat-xs} { + &.tb-x-pos-header, &.tb-y-pos-header { + display: none; + } + &.tb-key-header { + display: none; + } + } } .tb-form-table-body { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-source-row.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-source-row.component.scss index c72a6cb279..2244f6d14f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-source-row.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-source-row.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import '../../../../../../../../../scss/constants'; + .tb-form-table-row.tb-map-data-source-row { .tb-source-field { @@ -26,10 +28,29 @@ .tb-data-keys-field { flex: 1 1 50%; + min-width: 0; } .tb-remove-button { width: 40px; min-width: 40px; } + + @media #{$mat-lt-lg} { + .tb-source-field { + flex-direction: column; + flex: 1 1 30%; + } + .tb-data-keys-field { + flex: 1 1 70%; + } + @media #{$mat-lt-md} { + .tb-source-field { + flex: 1 1 50%; + } + .tb-data-keys-field { + flex: 1 1 50%; + } + } + } } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-sources.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-sources.component.scss index a94235ab2b..28788cb4f1 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-sources.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-data-sources.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import '../../../../../../../../../scss/constants'; + .tb-map-data-sources { .tb-form-table-header-cell { &.tb-source-header { @@ -25,6 +27,22 @@ width: 40px; min-width: 40px; } + @media #{$mat-lt-lg} { + &.tb-source-header { + flex: 1 1 30%; + } + &.tb-data-keys-header { + flex: 1 1 70%; + } + @media #{$mat-lt-md} { + &.tb-source-header { + flex: 1 1 50%; + } + &.tb-data-keys-header { + flex: 1 1 50%; + } + } + } } .tb-form-table-body { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layer-row.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layer-row.component.scss index 84252605b0..89949ec96e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layer-row.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layer-row.component.scss @@ -27,6 +27,9 @@ .tb-layer-field { flex: 1 1 33.33%; + @media #{$mat-xs} { + display: none; + } } .tb-remove-button { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layers.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layers.component.scss index 9ec77dd324..e5b035ddd3 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layers.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-layers.component.scss @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@import '../../../../../../../../../scss/constants'; + .tb-map-layers { .tb-form-table-header-cell { &.tb-label-header { @@ -23,6 +25,9 @@ } &.tb-layer-header { flex: 1 1 33.33%; + @media #{$mat-xs} { + display: none; + } } &.tb-actions-header { width: 120px; diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-settings.component.html index a7b725cb3f..38a5d13922 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-settings.component.html @@ -35,7 +35,7 @@
-
+
{{ 'widgets.maps.overlays.overlays' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-tooltip-tag-actions.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-tooltip-tag-actions.component.html index 2060f394f1..d743f70919 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-tooltip-tag-actions.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/map-tooltip-tag-actions.component.html @@ -15,10 +15,10 @@ limitations under the License. --> -
+
widgets.maps.data-layer.tooltip-tag-actions
-
- +
+ diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-clustering-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-clustering-settings.component.html index e363444481..2a85f8d514 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-clustering-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/marker-clustering-settings.component.html @@ -31,13 +31,13 @@ {{ 'widgets.maps.data-layer.marker.clustering.zoom-on-cluster-click' | translate }}
-
+
widgets.maps.data-layer.marker.clustering.max-zoom
-
+
widgets.maps.data-layer.marker.clustering.max-radius
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/trip-timeline-settings.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/trip-timeline-settings.component.html index 7af7d77671..9729c3559d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/trip-timeline-settings.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/map/trip-timeline-settings.component.html @@ -35,7 +35,7 @@ ms
-
+
widgets.maps.timeline.speed-options
@@ -45,7 +45,7 @@
-
+
{{ 'widgets.maps.timeline.timestamp' | translate }}