我有创建线
var line1=new Kinetic.Line({
stroke:"blue",
strokeWidth:10,
points:[{"x":152,"y":176},{"x":152,"y":399},{"x":271,"y":399},{"x":271,"y":487},{"x":401,"y":487},{"x":401,"y":370},{"x":541,"y":370},{"x":541,"y":262},{"x":293,"y":262},{"x":293,"y":177}],
})
为了节省我这样做的积分,
var linearray=new Array
linearray=line.getPoints()
它有效,现在我想像这样将点 X 和 Y 保存在不同的数组中,
var linex=new Array()
linex=line.getPoints().x
var liney=new Array()
linex=line.getPoints().y
它不起作用,有什么想法吗?
更新:这是我的小提琴http://jsfiddle.net/skarat001/8kgKx/