我使用 kineticjs 库。我创建了这样一行(http://jsfiddle.net/zP364/)
var redLine = new Kinetic.Line({
points: [973, 570, 340, 423, 450, 60, 500, 20],
stroke: 'red',
strokeWidth: 15,
lineCap: 'round',
lineJoin: 'round',
draggable: true
});
当我单击更改按钮时,我希望行必须像这样更改。谢谢
document.getElementById('change').addEventListener('click', function() {
redLine.point = [600, 400, 300, 100, 700, 80, 200, 30]; // i want re-draw line
redLine.stroke = 'blue'; // and change color
layer.draw();
}, false);