我已经更新到 4.4。我正在像这样初始化一个 Text 对象:
var droppableText = new Kinetic.Text({
x : posX,
y : posY,
name : field,
stroke : '#555',
strokeWidth : 2,
fill : '#ddd',
text : text,
fontSize : fontSize,
fontFamily : 'Calibri',
textFill : '#555',
width : width,
height : height,
padding : padding,
align : 'center',
fontStyle : 'italic',
shadow : {
color : 'black',
blur : 10,
offset : [10, 10],
opacity : 0.2
},
cornerRadius : 10
});
似乎 X、Y 和文本位置正确,但没有像以前那样的背景或边框。这在我使用 4.0 版本之前有效,我刚刚更新到 4.4,现在它不起作用。想法?