nativescript-photoviewer icon indicating copy to clipboard operation
nativescript-photoviewer copied to clipboard

TypeError: Cannot read property 'DarkVibrant' of undefined

Open max-pro opened this issue 6 years ago • 2 comments

Hello, I'm using nativescript-vue here is my code

import { PhotoViewer, PhotoViewerOptions, PaletteType, NYTPhotoItem } from "nativescript-photoviewer";

try{
        let images = args.object.images.split(',');
        let photoviewerOptions = {
            startIndex: 0,
            android: {
                paletteType: PaletteType.DarkVibrant,
                showAlbum: false
            }
        };
        photoViewer.showGallery(myImages, photoviewerOptions);
      }
      catch(e){
        console.log(e);
      }

also try using

const PhotoViewer = require('nativescript-photoviewer').PhotoViewer;
const PhotoViewerOptions = require('nativescript-photoviewer').PhotoViewerOptions;
const PaletteType = require('nativescript-photoviewer').PaletteType;
const NYTPhotoItem = require('nativescript-photoviewer').NYTPhotoItem;

Error: TypeError: Cannot read property 'DarkVibrant' of undefined

max-pro avatar Mar 31 '19 12:03 max-pro

Seems it cannot read the enum types. Not sure is the enums must be defined in a special way for Vue.

manijak avatar Apr 08 '19 20:04 manijak

I even try using plain javascript still I was getting the same error

max-pro avatar Apr 09 '19 10:04 max-pro