Socket
Book a DemoInstallSign in
Socket

area-select-mark

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

area-select-mark

[Demo](https://open-node.github.io/area-select-mark/)

0.1.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

area-select-mark

Demo

npm install area-select-mark --save
// html
// <div id="container1"></div>
const = require('area-select-mark');

const el = document.getElementById('container1');

const selectMark = new SelectMark(
  el,                       // 事先创建一个容器
  300,                      // 图片宽度限制, 系统会自动等比缩放图片,标记位置也同样会转换
  './assets/demo1.jpg',     // 要标记的图片地址
  [                         // 初始标记
    [100, 100, 200, 150]    // x, y, 宽, 高 (此标记位置坐标以及宽高是针对原图尺寸的)
  ]                         // 可以是多项
);

const marks = selectMark.getMarks(); // 得到当前的标记(系统已做了转换,得到的坐标以及宽高均是针对原图尺寸的)

FAQs

Package last updated on 14 Jul 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.