Skip to main content

GoDraw Document

An image is stored in a container field, but it is also stored as a JSON string in a text field.

GoDraw3: The GoDraw Document from Geist Interactive on Vimeo.

The Document

It contains at minimum two properties:

Zwibbler Property

  • The Zwibbler document array, this is the editable document form.
  • The Global property. Settings here will be used for every image created or edite.
  • This is the Zwibbler storage format  described here.

GoDraw Property

  • An object for storing GoDraw specific extensions to the zwibbler document form.
  • This is a 'local' property.
  • This object currently has only one property, a "config" object.  Any zwibbler configs set here will override the configs passed in the main config object.

Example

Here is a very simple document.


"zwibbler":[ 

"type":"document",
"height":400,
"width":400
},

"id":0,
"type":"GroupNode",
"fillStyle":"#cccccc",
"strokeStyle":"#000000",
"lineWidth":2,
"shadow":false,
"matrix":[ 
1,
0,
0,
1,
0,
0
],
"layer":"default"
},

"id":1,
"type":"PageNode",
"parent":0,
"fillStyle":"#cccccc",
"strokeStyle":"#000000",
"lineWidth":2,
"shadow":false,
"matrix":[ 
1,
0,
0,
1,
0,
0
],
"layer":"default"
},

"id":3,
"type":"PathNode",
"parent":1,
"fillStyle":"#e0e0e0",
"strokeStyle":"#000000",
"lineWidth":2,
"shadow":false,
"matrix":[ 
2.71,
0,
0,
2.73,
196.5,
189.5
],
"layer":"default",
"textFillStyle":"#000000",
"fontName":"Arial",
"fontSize":24,
"dashes":"",
"shapeWidth":0,
"smoothness":0.3,
"sloppiness":0,
"closed":true,
"arrowSize":0,
"arrowXOffset":null,
"arrowStyle":"simple",
"doubleArrow":false,
"text":"",
"roundRadius":0,
"wrap":false,
"angleArcs":0,
"commands":[ 
0,
0,
-50,
6,
50,
0,
50,
-50,
6,
0,
50,
50,
50,
6,
-50,
0,
-50,
50,
6,
0,
-50,
-50,
-50,
7
],
"seed":2453
}
],
"godraw":{ 
"config":{ 
"pageView":true,
"background":"pink"
}
}
}

Editing of the Config

See more information here BROKEN LINK.