mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-23 15:59:45 -05:00
Documentation: add Project Hierarchy properties.
This commit is contained in:
parent
b39d1c0695
commit
7910d134a7
1 changed files with 54 additions and 1 deletions
|
@ -143,6 +143,59 @@ var Project = this.Project = Base.extend({
|
||||||
this._selectedItems[i].setSelected(false);
|
this._selectedItems[i].setSelected(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@grouptitle Project Hierarchy}
|
||||||
|
*
|
||||||
|
* The layers contained within the document.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* // When you create a new Document it always contains
|
||||||
|
* // a layer called 'Layer 1'
|
||||||
|
* console.log(document.layers); // Layer (Layer 1)
|
||||||
|
*
|
||||||
|
* // Create a new layer called 'test' in the document
|
||||||
|
* var newLayer = new Layer();
|
||||||
|
* newLayer.name = 'test';
|
||||||
|
*
|
||||||
|
* console.log(document.layers); // Layer (test), Layer (Layer 1)
|
||||||
|
* console.log(document.layers[0]); // Layer (test)
|
||||||
|
* console.log(document.layers.test); // Layer (test)
|
||||||
|
* console.log(document.layers['Layer 1']); // Layer (Layer 1)
|
||||||
|
*
|
||||||
|
* @name Project#layers
|
||||||
|
* @type array
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The layer which is currently active. The active layer is indicated in the
|
||||||
|
* Layers palette by a black triangle. New items will be created on this
|
||||||
|
* layer by default.
|
||||||
|
*
|
||||||
|
* @name Project#activeLayer
|
||||||
|
* @type Layer
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The symbols contained within the document.
|
||||||
|
*
|
||||||
|
* @name Project#symbols
|
||||||
|
* @type array
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The views contained within the project.
|
||||||
|
*
|
||||||
|
* @name Project#views
|
||||||
|
* @type array
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The view which is currently active.
|
||||||
|
*
|
||||||
|
* @name Project#activeView
|
||||||
|
* @type View
|
||||||
|
*/
|
||||||
|
|
||||||
draw: function(ctx) {
|
draw: function(ctx) {
|
||||||
ctx.save();
|
ctx.save();
|
||||||
var param = { offset: new Point(0, 0) };
|
var param = { offset: new Point(0, 0) };
|
||||||
|
|
Loading…
Reference in a new issue