File

projects/maplander/components/src/lib/components/property/components/gallery/gallery.service.ts

Index

Properties

Properties

indexSelected
indexSelected: number
Type : number
multimedia
multimedia: PFile[]
Type : PFile[]
type
type: "IMAGE" | "VIDEO" | "SPHERIC"
Type : "IMAGE" | "VIDEO" | "SPHERIC"
import {Injectable} from '@angular/core';
import {MatDialog, MatDialogRef} from '@angular/material/dialog';
import {PFile} from '@maplander/types';
import {GalleryComponent} from './gallery.component';

export interface GalleryConfig {
  multimedia: PFile[];
  indexSelected: number;
  type: 'IMAGE' | 'VIDEO' | 'SPHERIC';
}


@Injectable()
export class GalleryService {

  constructor(
    private _dialog: MatDialog
  ) {
  }

  public open(multimedia: PFile[], indexSelected?: number, type?: 'IMAGE' | 'VIDEO' | 'SPHERIC'): MatDialogRef<GalleryComponent> {
    return this._dialog.open<GalleryComponent, GalleryConfig>(
      GalleryComponent, {
      data: {
        multimedia: multimedia || [],
        indexSelected: indexSelected || 0,
        type: type || null
      },
      disableClose: true,
      panelClass: 'gallery_dialog'
    });
  }
}

result-matching ""

    No results matching ""