mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
finished matrix integration. the stage, layers, groups, and nodes can be transformed in anyway, and drag and drop on any of these nodes now works great regardless of parent node transforms
This commit is contained in:
11
src/Layer.js
11
src/Layer.js
@@ -26,13 +26,17 @@ Kinetic.Layer = function(config) {
|
||||
*/
|
||||
Kinetic.Layer.prototype = {
|
||||
/**
|
||||
* public draw children
|
||||
* draw children nodes. this includes any groups
|
||||
* or shapes
|
||||
*/
|
||||
draw: function() {
|
||||
this._draw();
|
||||
},
|
||||
/**
|
||||
* clear layer
|
||||
* clears the canvas context tied to the layer. Clearing
|
||||
* a layer does not remove its children. The nodes within
|
||||
* the layer will be redrawn whenever the .draw() method
|
||||
* is used again.
|
||||
*/
|
||||
clear: function() {
|
||||
var context = this.getContext();
|
||||
@@ -52,7 +56,8 @@ Kinetic.Layer.prototype = {
|
||||
return this.context;
|
||||
},
|
||||
/**
|
||||
* add node to layer
|
||||
* add a node to the layer. New nodes are always
|
||||
* placed at the top.
|
||||
* @param {Node} node
|
||||
*/
|
||||
add: function(child) {
|
||||
|
||||
Reference in New Issue
Block a user