mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
decided that the developer should be responsible for setting custom drawing functions, images, and event handlers via selectors rather than a hash map passed into the load() method
This commit is contained in:
@@ -212,13 +212,8 @@ Kinetic.Stage.prototype = {
|
||||
/**
|
||||
* load stage with JSON string
|
||||
*/
|
||||
load: function(json, drawFuncs) {
|
||||
load: function(json) {
|
||||
function loadNode(node, obj) {
|
||||
// if custom shape then set draw function
|
||||
if(obj.nodeType === 'Shape' && obj.shapeType === undefined) {
|
||||
node.drawFunc = drawFuncs[obj.attrs.drawFuncName];
|
||||
}
|
||||
|
||||
var children = obj.children;
|
||||
if(children !== undefined) {
|
||||
for(var n = 0; n < children.length; n++) {
|
||||
|
||||
Reference in New Issue
Block a user