Comments (2)
已解决
addLabel: function() {
let jsonData = JSON.stringify(this.annotator.store.json, null, 2);
let list = JSON.parse(jsonData);
const newLabelCategory = {
id: list.labelCategories.length,
text: this.addLabelText,
color: this.getRandomColor(),
borderColor: this.getRandomColor()
};
this.annotator.store.labelCategoryRepo.add(newLabelCategory)
this.getCode()
},
from poplar.
addLabel: function() {
let newID = -1;
for (let [_, category] of this.annotator.store.labelCategoryRepo) {
newID = category["id"]+1
}
const newLabelCategory = {
id: newID,
text: this.addLabelText,
color: this.getRandomColor(),
borderColor: this.getRandomColor()
};
this.annotator.store.labelCategoryRepo.add(newLabelCategory)
console.log(this.labelCategories);
this.getCode()
},
from poplar.
Related Issues (20)
- connectionCategories以及labelCategories可以动态修改吗
- 项目中使用该包进行初始化后存在的问题 HOT 1
- html标签如何使用呢
- 111
- 异常关系连接失败无法回显
- 当把含有annotator的部分做成组件 然后在主页面中进行循环渲染时,svg永远只有300px宽度 HOT 1
- ie11
- 多行标注,标签显示不出的问题 HOT 3
- labelCategories为空数组时,文章只显示一行内容?
- contentInsert 为何只能键盘输入 手动给value赋值报错 HOT 1
- 火狐浏览器标注位置显示错误的问题
- contentEditable为false时,导出svg报错
- 可否写一个简明的启动说明文档 HOT 3
- 构造函数第一个参数使用字符串报错 HOT 1
- 数据读取
- 没有鼠标悬浮事件
- 样式无法修改 HOT 1
- config 完全不起作用
- Bug: selection of more than one line gives a unexpected behaviour
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poplar.