Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

autoannotate addon error in UMD version #878

@magelan

Description

@magelan

@tnrich

Hi,

trying to get the autoannotate addon working in universal mode.
The linked html example file in the readme does not exist anymore.
https://github.com/TeselaGen/openVectorEditor#full-example
so I build instead on the deployed example and use this code:

<html>
  <head>
    <link
      rel="stylesheet"
      type="text/css"
      href="https://unpkg.com/open-vector-editor/umd/main.css"
    />
  </head>
  <body style="display: flex">

    <script
      type="text/javascript"
      src="https://unpkg.com/open-vector-editor/umd/open-vector-editor.js"
    ></script>
     <script
      type="text/javascript"
      src="https://unpkg.com/ove-auto-annotate/umd/ove-auto-annotate.js"

    ></script>
    <script type="text/javascript">


      const editor3 = window.createVectorEditor("createDomNodeForMe", {
        autoAnnotateFeatures: window._ove_addons.autoAnnotateFeatures,
          withPreviewMode: false,
        showMenuBar: true,
        editorName: "YetAnotherSequence"
      });
      /* createDomNodeForMe will make a dom node for you and append it to the document.body*/
      editor3.updateEditor({
          readOnly:false,
        autoAnnotateFeatures: window._ove_addons.autoAnnotateFeatures,
        sequenceData: {
          name: "Wait for Me!",
          circular: true,
          sequence:
            "gtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaaccccccgtaacccccc",
          features: [
            {
              id: "19f0fjj",
              name: "abcd",
              type: "RBS",
              start: 1,
              end: 5
            },

            {
              id: "24t2t",
              name: "pj1",
              type: "CDS",
              start: 10,
              end: 50
            },
            {
              id: "82020000",
              name: "pj3",
              type: "CDS",
              start: 10,
              end: 50
            }
          ]
        }
      });
    </script>
  </body>
</html>

Using the autoannotate function gives me the error popup:
Error annotating feature(s). Double check your file to make sure it is valid!
Even if I use the downloaded examples for both csv and ApE files.
The console error message is:

"index.js:426 error: TypeError: Cannot read properties of undefined (reading 'find')
at _callee2$ (index.js:288:50)
at tryCatch (runtime.js:63:15)
at Generator.invoke [as _invoke] (runtime.js:293:1)
at Generator.next (runtime.js:118:1)
at src_asyncGeneratorStep (ove-auto-annotate.js:1415:107)
at _next (ove-auto-annotate.js:1417:197)
at ove-auto-annotate.js:1417:375
at new Promise ()
at ove-auto-annotate.js:1417:100
at validateRow (index.js:279:31)
at _callee3$ (index.js:364:23)
at tryCatch (runtime.js:63:15)
at Generator.invoke [as _invoke] (runtime.js:293:1)
at Generator.next (runtime.js:118:1)
at src_asyncGeneratorStep (ove-auto-annotate.js:1415:107)
at _next (ove-auto-annotate.js:1417:197)"

Is autoannotate not supported in the UMD version?

Cheers
Franz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions