javascript - Image does not render with KineticJS -


I'm just trying to render an image with Kinetic, but nothing appears, nor I get an error.

Bella can be found.

Source code:

  $ (function () {var stage = new kinetic.Stage ({container: 'container', width: 400, height: 800}) ; Var layer = new kinetic layer; var yoda = new kinetic image ({x: 0, y: 0, width: 200, height: 400}); var imageObj = new image (); imageObj.src = 'Http://farm6.staticflickr.com/5448/9408019718_88934b087e_b.jpg'; imageObj.onload = function () {yoda.setImage (imageObj); layer.draw ();}; Layer.add (yoda); stage. Add (layer);});    

You can call & lt; for Kinetic JSs Div & gt; Container should use Stage:

  & lt; Div id = "container" & gt; & Lt; / Div & gt;   



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -