Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ailabel
Advanced tools
Readme
AILabel类库是一款集打点、线段、多段线、矩形、多边形、圆圈、涂抹等多标注形式于一体,附加文本(Text)、标记(Marker)、缩略图(EagleMap)、Scale(比例尺)等控件以及Util等辅助工具的在线Web端标注工具库。目前已被广泛应用于多标注项目中。
源代码:https://github.com/dingyang9642/AILabel(star点起来)
API文档:http://ailabel.com.cn/public/ailabel/api/index.html
Demo文档:http://ailabel.com.cn/public/ailabel/demo/index.html
Demo1文档:http://ailabel.com.cn/public/ailabel/demo/label/index.html
npm地址:https://www.npmjs.com/package/ailabel
libs
npm i
npm run dev // 启动rollup
open demo->index.html
doc
npm i
npm run build
第一个小栗子
图片层的添加
// 声明容器
const gMap =new AILabel.Map(CONTAINER_ID, {
center: {x: 250, y: 177},
zoom: 800,
mode: 'PAN' // 绘制线段
});
// 显示一张图片
const gFirstImageLayer = new AILabel.Layer.Image(
'first-layer-image', // id
{
src: image.src,
width: image.width,
height: image.height,
position: { // 图片左上角坐标
x: 0,
y: 0
}
}, // imageInfo
{name: '第一个图片图层'}, // props
{zIndex: 5} // style
);
gMap.addLayer(gFirstImageLayer);
图形绘制/编辑
多边形绘制编辑举例
// 添加矢量图层(用于展示矢量图形)
const gFirstFeatureLayer = new AILabel.Layer.Feature(
'first-layer-feature', // id
{name: '第一个矢量图层'}, // props
{zIndex: 10} // style
);
gMap.addLayer(gFirstFeatureLayer);
// gMap实例添加events事件监听
gMap.events.on('drawDone', (type: EMapMode, data) => {
if (type === 'POLYGON') {
const polygonFeature = new AILabel.Feature.Polygon(
`${+new Date()}`, // id
{points: data}, // shape
{name: '矢量图形'}, // props
drawingStyle // style
);
gFirstFeatureLayer.addFeature(polygonFeature);
}
else if (...) {
// 其他类型Feature绘制完成处理
}
}
请遵循:Apache License 开源协议
FAQs
The npm package ailabel receives a total of 63 weekly downloads. As such, ailabel popularity was classified as not popular.
We found that ailabel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.