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

Circle and eclipse selectors don't have a widget  #24

Description

@the-yaz

I add the plugin of toolbar and selector pack , for the defaul selector rect and polygon they have the widget but the circle and eclipse selectors doesn't have it , how can I add it to them ?
edit : in the basic example it work good but by adding anything to the anno init , the eclipse and circle stop having widget , right now i just tried to add formatter of shape label and it didn't work , always there is error n.reduce is not a function.
here my code :

<html>
  <head>
    <!-- Annotorious first -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@recogito/annotorious@latest/dist/annotorious.min.css">
    
  </head>

  <body>
    <div id="my-toolbar-container"></div>
    <img id="hallstatt" src="640px-Hallstatt.jpg">
    <script src="https://cdn.jsdelivr.net/npm/@recogito/annotorious@latest/dist/annotorious.min.js"></script>
    <script src="annotorious-shape-labels.min.js"></script> 
    <!-- Selector Pack plugin -->
    <script src="https://cdn.jsdelivr.net/npm/@recogito/annotorious-toolbar@latest/dist/annotorious-toolbar.min.js"></script>
    <script src="selector.js"></script>
    <script>

      window.onload = function() {
        // Init Annotorious
       

      var anno = Annotorious.init({
          image: 'hallstatt',
          formatter: Annotorious.ShapeLabelsFormatter()
      });
         
        // Init the plugin
        Annotorious.SelectorPack(anno);
        Annotorious.Toolbar(anno, document.getElementById('my-toolbar-container'));
        // [ 'rect', 'polygon', 'point', 'circle', 'ellipse', 'freehand' ]
        console.log(anno.listDrawingTools());

      }
    </script>
  </body>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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