简体   繁体   English

Kinetic.js 4.0.2中的多边形坏了吗?

[英]Polygon in Kinetic.js 4.0.2 broken?

I upgraded my scripts to use kinetic.js 4.0.2 because of another bugfix. 由于另一个错误修复,我将脚本升级为使用dynamic.js 4.0.2。 Now all elements I created as Polygon ar not showing up anymore. 现在,我创建为“多边形”的所有元素不再显示。 If I console.log() on the objects they seem to exist but they are not drawn. 如果我在对象上使用console.log(),它们似乎存在但未绘制。

Even the minimum Polygon: 甚至最小的多边形:

var test = new Kinetic.Polygon({
        points: [10,10,20,50, 100,100,10,10]
    });

does not show up. 没有出现。 Any other things lines, text, images work still fine. 线条,文字,图像等任何其他东西仍然可以正常工作。

Did anyone also notices this behaviour? 有人也注意到这种行为吗?

Looks like Kinetic is starting to enforce x, y pair mappings for points and no longer accepting one long array of co-ordinates. 看起来Kinetic正在开始对点强制执行x,y对映射,并且不再接受一长列坐标。 You can see it here. 在这里你可以看到它。

http://jsfiddle.net/rALbw/8/ http://jsfiddle.net/rALbw/8/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM