mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
parent
bca5480640
commit
76d07892d1
1 changed files with 29 additions and 2 deletions
|
@ -433,12 +433,39 @@ new function() { // Injection scope for various item event handlers
|
||||||
// injection scope above.
|
// injection scope above.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies whether the item is locked.
|
* Specifies whether the item is locked. When set to `true`, item
|
||||||
|
* interactions with the mouse are disabled.
|
||||||
*
|
*
|
||||||
* @name Item#locked
|
* @name Item#locked
|
||||||
* @type Boolean
|
* @type Boolean
|
||||||
* @default false
|
* @default false
|
||||||
* @ignore
|
*
|
||||||
|
* @example {@paperscript}
|
||||||
|
* var unlockedItem = new Path.Circle({
|
||||||
|
* center: view.center - [35, 0],
|
||||||
|
* radius: 30,
|
||||||
|
* fillColor: 'springgreen',
|
||||||
|
* onMouseDown: function() {
|
||||||
|
* this.fillColor = Color.random();
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* var lockedItem = new Path.Circle({
|
||||||
|
* center: view.center + [35, 0],
|
||||||
|
* radius: 30,
|
||||||
|
* fillColor: 'crimson',
|
||||||
|
* locked: true,
|
||||||
|
* // This event won't be triggered because the item is locked.
|
||||||
|
* onMouseDown: function() {
|
||||||
|
* this.fillColor = Color.random();
|
||||||
|
* }
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* new PointText({
|
||||||
|
* content: 'Click on both circles to see which one is locked.',
|
||||||
|
* point: view.center - [0, 35],
|
||||||
|
* justification: 'center'
|
||||||
|
* });
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue