【发布时间】:2012-11-10 17:48:11
【问题描述】:
我有 KineticJS 矩形已经填充了“蓝色”颜色,我想在这个矩形框上显示文本。但我下面的代码没有显示任何内容。我还需要在按钮单击时分配此标签文本,相同的代码也在下面。
drawShape = new Kinetic.Rect({
id: shapeId,
name: shapeName,
x: 0,
y: 0,
width: 150,
height: 40,
fill: "#00D2FF",
stroke: "black",
strokeWidth: 3,
fillText: "Step" + stepNumber
});
function OnApplyPropertiesClick(){
drawShape.fillText(document.getElementById("txtLabel").value);
}
对此有任何帮助吗?请。
谢谢 比鲁
【问题讨论】:
标签: javascript canvas kineticjs