Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Error I am getting is (In the console):
Uncaught TypeError: Object #<Object> has no method '_initText' kinetic.js:52
I am trying to add simple Te
I am trying to add simple Text to my canvas (using Kinetic.Js) like this
var simpleText = Kinetic.Text();
As soon as I commment this line out, there is no error or warning. But when I keep this I get the error.
Judging by the fact that it's Text with capital T it is a constructor function and you have to new it up.
var simpleText = new Kinect.Text()
Check out this tutorial for example usage. More about JavaScript naming conventions here.
从它是带有大写 T 的 Text 的事实来看,它是一个构造函数,你必须更新它。
查看本教程以了解示例用法。更多关于 JavaScript 命名约定的信息在这里。