Skip to content

Commit bfd1b2c

Browse files
fix: remove expand option for map widgets (#1877)
* removed expand option for map widgets, both for back and front office * update front-office to hide fullscreen for widget if map ( keeping only leaflet fullscreen ) --------- Co-authored-by: Antoine Hurard <[email protected]>
1 parent da8adfc commit bfd1b2c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

libs/shared/src/lib/components/widget-grid/floating-options/floating-options.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<ui-icon icon="palette" variant="grey"></ui-icon>
2020
<span>{{ 'components.widget.styling' | translate }}</span>
2121
</button>
22-
<button uiMenuItem (click)="onClick('Expand')">
22+
<button uiMenuItem (click)="onClick('Expand')" *ngIf="canExpand">
2323
<ui-icon icon="open_in_full" variant="grey"></ui-icon>
2424
<span>{{ 'components.widget.expand' | translate }}</span>
2525
</button>

libs/shared/src/lib/components/widget-grid/floating-options/floating-options.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { UnsubscribeComponent } from '../../utils/unsubscribe/unsubscribe.compon
1818
export class FloatingOptionsComponent extends UnsubscribeComponent {
1919
// === WIDGET ===
2020
@Input() widget: any;
21+
@Input() canExpand = true;
2122

2223
// === EMIT ACTION SELECTED ===
2324
@Output() edit: EventEmitter<any> = new EventEmitter();

libs/shared/src/lib/components/widget-grid/widget-grid.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ <h2 *ngIf="widgets.length === 0">{{ 'models.widget.add' | translate }}</h2>
4646
*ngIf="canUpdate"
4747
class="absolute top-0 right-0 z-[1100]"
4848
[widget]="widget"
49+
[canExpand]="!(widget.component === 'map')"
4950
(edit)="onEditWidget($event)"
5051
(delete)="onDeleteWidget($event)"
5152
(expand)="onExpandWidget($event)"
@@ -69,7 +70,7 @@ <h2 *ngIf="widgets.length === 0">{{ 'models.widget.add' | translate }}</h2>
6970
</ui-icon>
7071
<!-- Expand button -->
7172
<ui-button
72-
*ngIf="!canUpdate"
73+
*ngIf="!canUpdate && !(widget.component === 'map')"
7374
[isIcon]="true"
7475
icon="open_in_full"
7576
variant="grey"

0 commit comments

Comments
 (0)