File

projects/maplander/components/src/lib/components/property/components/multimedia-uploader/multimedia-uploader.service.ts

Index

Methods

Constructor

constructor(_dialog: MatDialog)
Parameters :
Name Type Optional
_dialog MatDialog No

Methods

open
open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[])
Parameters :
Name Type Optional
currentType PFileTypeEnum No
multimedia PFile[] Yes
newMedia UserMedia[] Yes
import {Injectable} from '@angular/core';
import {MatDialog, MatDialogRef} from '@angular/material/dialog';
import {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';
import {MultimediaUploaderComponent} from './multimedia-uploader.component';

@Injectable()
export class MultimediaUploaderService {

  constructor(
    private _dialog: MatDialog
  ) {
  }

  open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[]): MatDialogRef<MultimediaUploaderComponent> {
    return this._dialog.open<MultimediaUploaderComponent, {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]},
      {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]}>
    (MultimediaUploaderComponent, {
      data: {currentType: currentType || PFileTypeEnum.IMAGE, multimedia: multimedia || [], newMedia: newMedia || []},
      panelClass: 'multimedia-uploader-panel-class',
      disableClose: true
    });
  }
}

result-matching ""

    No results matching ""