Skip to content
Snippets Groups Projects
Select Git revision
  • 66b9c4db80aa116b741ab9945c9bb2d2b6a90eda
  • mui5-tetras-main-stable default protected
  • mui5-tetras-main-old-stable
  • preprod protected
  • 75-dernieres-ameliorations-avant-workshop-du-7-02
  • wip-fix-xywh
  • wip-positionement-annot
  • wip-surface-transformer
  • uploads-file
  • 69-la-video-demare-quand-on-fait-glisser-le-slider-et-le-clic-creer-un-decalage-entre-le-player
  • 61-recettage-des-outils-d-annotation
  • gestion_multiple_ouverture_pannel_annotation
  • autorisation_un_pannel_annotation
  • autorisation_un_pannel_edition_annotation
  • récupération_temps_video
  • save-shapes-and-position
  • fix-error-create-annotation-pannel
  • time-saving-on-annotation
  • tetras-main protected
  • fix-poc-mirador
  • tetras-antho-test
21 results

index.js

Blame
  • index.js 1.53 KiB
    import mirador from 'mirador/dist/es/src/index';
    import annotationPlugins from '../../src';
    import LocalStorageAdapter from '../../src/LocalStorageAdapter';
    import AnnototAdapter from '../../src/AnnototAdapter';
    
    const endpointUrl = 'http://127.0.0.1:3000/annotations';
    const config = {
      annotation: {
        adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
        // adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
        exportLocalStorageAnnotations: false, // display annotation JSON export button
      },
      catalog: [
        { manifestId: 'https://files.tetras-libre.fr/manifests/re_walden_cut.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/jf_peyret_re_walden.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/test_markeas_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/installation_fresnoy_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/sceno_avignon_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/walden_nouvel_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/walden_nouvel2_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/score_manifest.json' },
        { manifestId: 'https://files.tetras-libre.fr/manifests/program_manifest.json' },
      ],
      debugMode: true,
      id: 'demo',
      window: {
        defaultSideBarPanel: 'annotations',
        sideBarOpenByDefault: true,
      },
      windows: [
      ],
    };
    
    mirador.viewer(config, [...annotationPlugins]);