-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added typescript and update old dependencies to React v.18 #237
base: master
Are you sure you want to change the base?
Changes from all commits
fb72cbf
f529b2c
aef1c19
a9ceb31
8781aa4
116dba1
9749868
bc6ae80
b209688
2feb5cc
22124c7
28dec45
c2244cc
f9fa0c3
842424c
736d78b
ce8f0f8
dce4729
4f4cffe
0f66300
d35c761
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ dist | |
secret.* | ||
secret.story.* | ||
*.secret.* | ||
.idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
.github | ||
node_modules | ||
src |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"semi": false | ||
"semi": true | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# React Image Annotate | ||
|
||
[![npm version](https://badge.fury.io/js/react-image-annotate.svg)](https://badge.fury.io/js/react-image-annotate) | ||
[![npm version](https://img.shields.io/npm/v/@idapgroup/react-image-annotate.svg)](https://www.npmjs.com/package/@idapgroup/react-image-annotate) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can basically remove the README changes here |
||
|
||
The best image/video annotation tool ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). Or the [code sandbox here](https://codesandbox.io/s/react-image-annotate-example-38tsc?file=/src/App.js:0-403). | ||
Fork of react-image-annotate - The best image/video annotation tool | ||
ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). Or | ||
the [code sandbox here](https://codesandbox.io/s/react-image-annotate-example-38tsc?file=/src/App.js:0-403). | ||
|
||
## Sponsors | ||
Implemented features in fork: | ||
|
||
[![wao.ai sponsorship image](https://s3.amazonaws.com/asset.workaround.online/sponsorship-banner-1.png)](https://wao.ai) | ||
- added typescript | ||
- updated react to v.18 | ||
|
||
## Features | ||
|
||
|
@@ -20,11 +23,11 @@ The best image/video annotation tool ever. [Check out the demo here](https://uni | |
|
||
## Usage | ||
|
||
`npm install react-image-annotate` | ||
`npm i @idapgroup/react-image-annotate` | ||
|
||
```javascript | ||
import React from "react"; | ||
import ReactImageAnnotate from "react-image-annotate"; | ||
import ReactImageAnnotate from "@idapgroup/react-image-annotate"; | ||
|
||
const App = () => ( | ||
<ReactImageAnnotate | ||
|
@@ -56,42 +59,48 @@ following line added to a css file should suffice. | |
|
||
All of the following properties can be defined on the Annotator... | ||
|
||
| Prop | Type (\* = required) | Description | Default | | ||
| ------------------------ | ------------------------------------------------ | --------------------------------------------------------------------------------------- | ------------- | | ||
| `taskDescription` | \*`string` | Markdown description for what to do in the image. | | | ||
| `allowedArea` | `{ x: number, y: number, w: number, h: number }` | Area that is available for annotation. | Entire image. | | ||
| `regionTagList` | `Array<string>` | Allowed "tags" (mutually inclusive classifications) for regions. | | | ||
| `regionClsList` | `Array<string>` | Allowed "classes" (mutually exclusive classifications) for regions. | | | ||
| `imageTagList` | `Array<string>` | Allowed tags for entire image. | | | ||
| `imageClsList` | `Array<string>` | Allowed classes for entire image. | | | ||
| `enabledTools` | `Array<string>` | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. | | ||
| `showTags` | `boolean` | Show tags and allow tags on regions. | `true` | | ||
| `selectedImage` | `string` | URL of initially selected image. | | | ||
| `images` | `Array<Image>` | Array of images to load into annotator | | | ||
| `showPointDistances` | `boolean` | Show distances between points. | `false` | | ||
| `pointDistancePrecision` | `number` | Precision on displayed points (e.g. 3 => 0.123) | | | ||
| `onExit` | `MainLayoutState => any` | Called when "Save" is called. | | | ||
| `RegionEditLabel` | `Node` | React Node overriding the form to update the region (see [`RegionLabel`](https://github.com/waoai/react-image-annotate/blob/master/src/RegionLabel/index.js)) | | | ||
| `allowComments` | `boolean` | Show a textarea to add comments on each annotation. | `false` | | ||
| `hidePrev` | `boolean` | Hide `Previous Image` button from the header bar. | `false` | | ||
| `hideNext` | `boolean` | Hide `Next Image` button from the header bar. | `false` | | ||
| `hideClone` | `boolean` | Hide `Clone` button from the header bar. | `false` | | ||
| `hideSettings` | `boolean` | Hide `Settings` button from the header bar. | `false` | | ||
| `hideFullScreen` | `boolean` | Hide `FullScreen/Window` button from the header bar. | `false` | | ||
| `hideSave` | `boolean` | Hide `Save` button from the header bar. | `false` | | ||
| Prop | Type (\* = required) | Description | Default | | ||
|----------------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| | ||
| `taskDescription` | \*`string` | Markdown description for what to do in the image. | | | ||
| `allowedArea` | `{ x: number, y: number, w: number, h: number }` | Area that is available for annotation. | Entire image. | | ||
| `regionTagList` | `Array<string>` | Allowed "tags" (mutually inclusive classifications) for regions. | | | ||
| `regionClsList` | `Array<string>` | Allowed "classes" (mutually exclusive classifications) for regions. | | | ||
| `regionTagSingleSelection` | `boolean` | Allowed select only one tag for image. | | | ||
| `regionAllowedActions` | `{remove?:boolean, lock?:boolean, visibility?: boolean` | Allowed actions for region in regions list. | Everything. | | ||
| `imageTagList` | `Array<string>` | Allowed tags for entire image. | | | ||
| `imageClsList` | `Array<string>` | Allowed classes for entire image. | | | ||
| `enabledTools` | `Array<string>` | Tools allowed to be used. e.g. "select", "create-point", "create-box", "create-polygon" | Everything. | | ||
| `showTags` | `boolean` | Show tags and allow tags on regions. | `true` | | ||
| `selectedImage` | `string` | URL of initially selected image. | | | ||
| `images` | `Array<Image>` | Array of images to load into annotator | | | ||
| `showPointDistances` | `boolean` | Show distances between points. | `false` | | ||
| `pointDistancePrecision` | `number` | Precision on displayed points (e.g. 3 => 0.123) | | | ||
| `onExit` | `MainLayoutState => any` | Called when "Save" is called. | | | ||
| `RegionEditLabel` | `Node` | React Node overriding the form to update the region (see [`RegionLabel`](https://github.com/waoai/react-image-annotate/blob/master/src/RegionLabel/index.js)) | | | ||
| `allowComments` | `boolean` | Show a textarea to add comments on each annotation. | `false` | | ||
| `hidePrev` | `boolean` | Hide `Previous Image` button from the header bar. | `false` | | ||
| `hideNext` | `boolean` | Hide `Next Image` button from the header bar. | `false` | | ||
| `hideClone` | `boolean` | Hide `Clone` button from the header bar. | `false` | | ||
| `hideSettings` | `boolean` | Hide `Settings` button from the header bar. | `false` | | ||
| `hideFullScreen` | `boolean` | Hide `FullScreen/Window` button from the header bar. | `false` | | ||
| `hideSave` | `boolean` | Hide `Save` button from the header bar. | `false` | | ||
|
||
## Developers | ||
|
||
### Development | ||
|
||
This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the cloned repo. | ||
This project uses [react-storybook](https://storybook.js.org/). To begin developing run the following commands in the | ||
cloned repo. | ||
|
||
1. `yarn install` | ||
2. `yarn storybook` | ||
2. `yarn add react react-dom` | ||
3. For production build need remove `react` and `react-dom` packages and | ||
run `yarn build` - it fix the issue with `react` and `react-dom` versions in your project. | ||
|
||
A browser tab will automatically open with the project components. | ||
|
||
See more details in the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development). | ||
See more details in | ||
the [contributing guidelines](https://github.com/waoai/react-image-annotate/wiki/Setup-for-Development). | ||
|
||
### Icons | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I accidentally changed it, i will fix it