Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bboxjs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bboxjs

BBoxJS is a light-weight Javascript solution for marking bounding boxes on an image

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

BBoxJS

BBoxJS is a light-weight Javascript solution for marking bounding boxes on an image

Installing BBoxJS

BBoxJS can used as an IIFE called from a script tag or installed as a libary via npm. After initializing a new BBoxAnnotator, BBoxJS will search for a

with an ID of bbox-annotator-container.

Using BBoxJS with React

npm install bboxjs
import React, { useRef } from 'react';
import BboxAnnotator from 'bboxjs';

export default function AnnotationEditor({ imgSrc }) {
    const div = useRef(null);

    if (div && div.current) {
        new BboxAnnotator(imgSrc, {
            prefix: 'testo-',
            callbacks: {
                onload: () => {
                    console.log('loaded')
                },
                onchange: (entries) => {
                    console.log(entries)
                }
            }
        })
    }
    
    return <div id="testo-bbox-annotator-container" style={{ width: '100%', zIndex: 999 }} ref={div} />
}

Using BBoxJS as an IIFE

<script src="dist/bbox.js"></script>

See demo.html for additional details.

Keywords

FAQs

Package last updated on 15 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc