【发布时间】:2023-03-13 15:49:01
【问题描述】:
我在这里搜索 fabricJS-circle ,但没有找到添加数字 1 或 2 或 3 等文本的方法...在画布上的圆圈内?
这是我在画布上的圆形对象:
function makeStaion(left, top, stationID) {
var c = new fabric.Circle({
left: left,
top: top,
radius: 2,
fill: '#5afffa',
stroke: '#666',
selectable: true,
centeredScaling:true,
padding:2,
hasRotatingPoint: false,
borderColor: 'black',
cornerColor: 'black'
});
c.hasControls = true;
c.station = true;
c.stationID = stationID;
c.stationName = stations[stationID].name;
c.description = stations[stationID].desc;
c.image = stations[stationID].image;
return c;
}
【问题讨论】:
-
Miss.Moran 您需要更新您尝试获取帮助(答案)的代码。参考:-stackoverflow.com/help/how-to-ask 有更多机会不关闭您的查询作为题外话..
标签: jquery canvas frontend fabricjs web-frontend