What is the difference between KineticJS methods layer.draw()
, layer.drawScene()
and layer.drawHit()
?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
Have a look at the source (v4.3.1), l. 3381ff. These are defined on a
Kinetic.Container
.The
drawScene
is used to draw the shapes onto the drawing canvas.The
drawHit
(see example) is used to allow to modify the region where mouse events trigger events. This is done internally using a specialKinetic.HitCanvas
.Update: You can find the code inside their Github repository.
draw()
can be found in Node.js, the other two inside Container.jsPlease be aware that Eric discontinued KineticJS.