GithubHelp home page GithubHelp logo

emory-lits-labs / annotator-imgselect Goto Github PK

View Code? Open in Web Editor NEW
13.0 6.0 5.0 794 KB

Annotator.js plugin for selecting and annotating portions of images

Home Page: http://emory-lits-labs.github.io/annotator-imgselect/

License: Apache License 2.0

JavaScript 44.67% CSS 44.80% HTML 10.53%

annotator-imgselect's Introduction

annotator-imgselect

Image selection plugin for Annotator.js

annotator-imgselect is developed for Annotator 2.x.

Demo

View a simple demo of annotator-imgselect.

License

annotator-imgselect is distributed under the Apache 2.0 License.

##Dependencies

##Using annotator-imgselect To use this plugin in your Annotator project, include the required javascript and css, and initialize it as an annotator module with a configuration of the image elements that can be selected for annotation.

See installation instructions for more details.

Placement of the image highlights currently requires that images be placed inside a parent element that can be used to contain and position highlights. See the demo for examples.

##Technical details

Image annotations are created with an empty quote and XPath DOM range (since no text is quoted and no DOM element precisely is selected), and makes use of the flexible extra data allowed for in annotations to add an image_selection entry with src and full uri to identify the image being annotated, along with percentage based width, height, and x and y coordinates to identify the portion of the image being annotated.

Image selection is on the roadmap to be natively supported in annotator.js, but this plugin was created in order to support image annotation in the meantime with the hope that eventually image annotations could be migrated to whatever format is determined for storing image annotations.

Developer Notes

This project uses git-flow branching conventions. Pull requests should be made against the develop branch for easiest integration.

To view the jekyll site for development, you should do the following:

  • make sure you are on the develop branch
  • make sure you have jekyll installed
  • run the site via jekyll: jekyll serve

To install grunt utilities for building a release, run npm install.

Released versions are published through GitHub site pages, which are served out from the gh-pages branch. Following git-flow conventions, this should be an exact replica of the master branch. As a convenience, to update the gh-pages branch from master and push it to github, you may want to configure the following alias in your .git/config for this project:

[alias]
    publish-pages = "!rm -rf build && git checkout gh-pages && git merge master && grunt && git add 'build/*' && git commit 'build/*' -m 'Latest build' && git push origin gh-pages && git checkout -"

Whenever you tag a new release you want to be available as a version that can be included from the github pages url, you should also do the following:

  • update the version number in package.json
  • checkout gh-pages branch and run grunt
  • add the build version of annotator.imgselect.min.js to gh-pages branch

annotator-imgselect's People

Contributors

alukach avatar rlskoeser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

annotator-imgselect's Issues

Cannot load images from database on page load

Hi, I am having a problem with loading the image annotations on page load.
image

In the image I am calling app.annotations.load which works fine for text annotations but not working for images. Here is the response, the object with rows key was the format needed to load text annotations.
image

Also when I include annotator.storage.http, I can no longer see the annotations when I hover over an annotation I have previously created.

Issues deleting annotation

I noticed that I could not delete annotations after they were created or if they are canceled the box would still show up in there.

Issue 1 (Annotations can't be cancelled):

issue

Issue 2 (Can't delete annotations):

issue2

I created two PR's to fix both issues :) please let me know if that works :).

Annotations not displaying on demo

I've been looking into your annotator plug in for some inspiration, and thought you might like to know that the demo site is not working properly. When I highlight part of the image, enter an annotation and click save, a yellow box appears on the area that I highlighted but I can't see any way of viewing my comment. If i hover over the yellow box I see a horizontal line with an arrow, but no way of viewing my comment.

I've tried both Chrome 50.0.2661.94 and Firefox 45.0.2, both on Mac OSX

Regards
Graham

After edit, Editor opens in wrong position

I've noticed that after a user edits an annotation, any following annotation creation opens the Editor above the annotation that was previously edited.

anim

I'm going to try digging into this today but I'm curious if @rlskoeser knows anything about why this may be (or can direct me to the tooling that controls where the editor opens).

Temporary boxes not getting deleted

When starting to annotate an object on the image if the user decides not to annotate it and click somewhere else a magenta square will be kept on the image even though no annotation was actually created. The magenta square can't be deleted after that.

The file attached show how to replicate it.

issue3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.