小编use*_*818的帖子

kineticjs rect fillText

我有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);  
}
Run Code Online (Sandbox Code Playgroud)

对此有何帮助?请.

谢谢Biru

javascript canvas kineticjs

2
推荐指数
1
解决办法
3690
查看次数

标签 统计

canvas ×1

javascript ×1

kineticjs ×1