mirror of
https://github.com/konvajs/konva.git
synced 2025-12-04 10:58:22 +08:00
new getAttrs() method
This commit is contained in:
16
dist/kinetic-core.js
vendored
16
dist/kinetic-core.js
vendored
@@ -284,6 +284,12 @@ Kinetic.Node.prototype = {
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* get attrs
|
||||
*/
|
||||
getAttrs: function() {
|
||||
return this.attrs;
|
||||
},
|
||||
/**
|
||||
* show node
|
||||
*/
|
||||
@@ -1113,7 +1119,7 @@ Kinetic.Stage.prototype = {
|
||||
addLayer(0);
|
||||
},
|
||||
/**
|
||||
* serialize stage and children as JSON object
|
||||
* serialize stage and children as a JSON object
|
||||
*/
|
||||
toJSON: function() {
|
||||
var go = Kinetic.GlobalObject;
|
||||
@@ -1140,7 +1146,13 @@ Kinetic.Stage.prototype = {
|
||||
return JSON.stringify(addNode(this));
|
||||
},
|
||||
/**
|
||||
* load stage with JSON string
|
||||
* load stage with JSON string. De-serializtion does not generate custom
|
||||
* shape drawing functions, images, or event handlers (this would make the
|
||||
* serialized object huge). If your app uses custom shapes, images, and
|
||||
* event handlers (it probably does), then you need to select the appropriate
|
||||
* shapes after loading the stage and set these properties via on(), setDrawFunc(),
|
||||
* and setImage()
|
||||
* @param {String} JSON string
|
||||
*/
|
||||
load: function(json) {
|
||||
function loadNode(node, obj) {
|
||||
|
||||
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user