{"id":0,"registry":{"0":{"submorphs":[],"scripts":[],"id":"8F49FA0E-5081-44BA-A238-65A30B9C899F","shape":{"__isSmartRef__":true,"id":1},"__layered_droppingEnabled__":true,"halosEnabled":false,"registeredForMouseEvents":true,"showsHalos":false,"name":"DockItem","partsBinMetaInfo":{"__isSmartRef__":true,"id":2},"eventHandler":{"__isSmartRef__":true,"id":25},"derivationIds":[127,"F0291F62-F100-480C-AEBF-0230398F7983","AE8B5ED7-E305-45BC-BE4A-1C28A49EE12B","39BA345C-17FA-45A0-BAC2-F0CF5654ACF8","FE91EA31-D8AE-461B-8A49-95DA5FBAE5B4","F38439A3-2F4E-4AC2-BF73-2633C00B1393","6748F5B5-2284-4748-A6EE-F1A261CBAD0B","BBAFB862-93AE-4F89-BCFF-9F1C67B7FE4C","7EC17E78-593A-4CC8-B7E3-859BCBBFE785","BD8BECDB-A9A1-4009-B433-C925F0AFCCFC","F2677A9D-5855-4DF2-B248-94545B34B762","D52188B3-7DC0-410E-96B1-50892AC00A37","1C17567C-751A-447E-A93C-0CE8CAEEF262","C31986AF-AB07-427F-BD76-E0F3859AC975","A9B13304-0F76-489D-9034-12A35EA46A9A"],"partTests":{"__isSmartRef__":true,"id":26},"_ClipMode":"visible","moved":true,"droppingEnabled":false,"__serializedExpressions__":["_Position"],"partName":null,"partsSpace":null,"partItem":null,"prototypePart":null,"iconMorph":null,"_ToolTip":null,"isBeingDragged":false,"_Rotation":0,"_Scale":1,"grabbingEnabled":false,"draggingEnabled":false,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":31},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"1":{"_BorderWidth":2.7760000000000002,"_ClipMode":"visible","_BorderRadius":8.14,"_Opacity":1,"_BorderStyle":"solid","__serializedExpressions__":["position","_Extent","_BorderColor","_Fill","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(50.0,51.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(255,255,255)","_Padding":"lively.rect(0,0,0,0)"},"2":{"partsSpaceName":"PartsBin/Rick","comment":"An item to go in a dock","migrationLevel":8,"partName":"DockItem","changes":[{"__isSmartRef__":true,"id":3},{"__isSmartRef__":true,"id":4},{"__isSmartRef__":true,"id":5},{"__isSmartRef__":true,"id":6},{"__isSmartRef__":true,"id":7},{"__isSmartRef__":true,"id":8},{"__isSmartRef__":true,"id":9},{"__isSmartRef__":true,"id":10},{"__isSmartRef__":true,"id":11},{"__isSmartRef__":true,"id":12},{"__isSmartRef__":true,"id":13},{"__isSmartRef__":true,"id":14},{"__isSmartRef__":true,"id":15},{"__isSmartRef__":true,"id":16},{"__isSmartRef__":true,"id":17},{"__isSmartRef__":true,"id":18},{"__isSmartRef__":true,"id":19},{"__isSmartRef__":true,"id":20},{"__isSmartRef__":true,"id":21},{"__isSmartRef__":true,"id":22},{"__isSmartRef__":true,"id":23},{"__isSmartRef__":true,"id":24}],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Sun Aug 10 2014 01:54:45 GMT-0700 (PDT)\")"},"3":{"author":"lauritz","message":"dropping enabled for the blue rectangle","id":"81D350CB-D926-491F-8FF3-A6C9C831BDF2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 12 2014 07:00:28 GMT-0700 (PDT)\")"},"4":{"author":"jenslincke","message":"no comment","id":"ECD12BFF-E872-4918-8341-C6571E72F36D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:24:27 GMT-0800 (PST)\")"},"5":{"author":"robertkrahn","message":"no comment","id":"FBBB9C99-B61C-4D5F-8750-6E2987DF0C9C","__serializedExpressions__":["date"],"date":"new Date(\"Thu Jun 20 2013 15:16:24 GMT-0700 (PDT)\")"},"6":{"author":"robertkrahn","message":"no comment","id":"67FD74CD-7AE4-4050-ADC7-4DF73804258D","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 30 2013 00:18:06 GMT-0700 (PDT)\")"},"7":{"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)\")"},"8":{"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:36 GMT-0700 (PDT)\")"},"9":{"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:30 GMT-0700 (PDT)\")"},"10":{"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)\")"},"11":{"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B","__serializedExpressions__":["date"],"date":"new Date(\"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)\")"},"12":{"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)\")"},"13":{"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350","__serializedExpressions__":["date"],"date":"new Date(\"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)\")"},"14":{"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)\")"},"15":{"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205","__serializedExpressions__":["date"],"date":"new Date(\"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)\")"},"16":{"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)\")"},"17":{"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)\")"},"18":{"author":"SAPLivelyScreen","message":"no comment","id":"EF145198-0649-41BD-A92E-521D98FEC49D","__serializedExpressions__":["date"],"date":"new Date(\"Wed May 29 2013 15:36:50 GMT-0700 (PDT)\")"},"19":{"author":"SAPLivelyScreen","message":"no comment","id":"7A44D8CA-6D5F-42A3-A4B4-4D7F51EECA52","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jun 18 2013 11:49:27 GMT-0700 (PDT)\")"},"20":{"author":"robertkrahn","message":"no comment","id":"A452871F-4EB9-45D1-94B8-6065CBA7B8FD","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jul 29 2013 23:20:51 GMT-0700 (PDT)\")"},"21":{"author":"jenslincke","message":"no comment","id":"ADFBF069-513C-4DE6-95A9-8AD4985C6508","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:23:53 GMT-0800 (PST)\")"},"22":{"__serializedExpressions__":["date"],"author":"rick","message":"no comment","id":"EAE2F881-FEED-49AD-9553-7B947AF9A8A0","date":"new Date(\"Sat Aug 09 2014 21:15:17 GMT-0700 (PDT)\")"},"23":{"__serializedExpressions__":["date"],"author":"rick","message":"no comment","id":"20C365D7-2BBB-43AC-90A9-3A76B96F74E7","date":"new Date(\"Sat Aug 09 2014 21:15:41 GMT-0700 (PDT)\")"},"24":{"__serializedExpressions__":["date"],"author":"rick","message":"no comment","id":"69CC5776-317C-40FD-8964-EF1D887FF23F","date":"new Date(\"Sat Aug 09 2014 21:15:57 GMT-0700 (PDT)\")"},"25":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"26":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":27}},"27":{"test01IsMorph":{"__isSmartRef__":true,"id":28}},"28":{"varMapping":{"__isSmartRef__":true,"id":29},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":30},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"29":{"this":{"__isSmartRef__":true,"id":26}},"30":{},"31":{"initWithPart":{"__isSmartRef__":true,"id":32},"makeIcon":{"__isSmartRef__":true,"id":35},"onMouseDown":{"__isSmartRef__":true,"id":38},"clear":{"__isSmartRef__":true,"id":45},"setTargetMorph":{"__isSmartRef__":true,"id":48},"clearTargetMorph":{"__isSmartRef__":true,"id":51}},"32":{"varMapping":{"__isSmartRef__":true,"id":33},"source":"function initWithPart(partName, partsSpace) {\n    // this.initWithPart('Ellipse', 'PartsBin/Basic')\n    this.targetMorph = null\n    this.partName = partName\n    this.partsSpace = partsSpace\n    this.prototypePart =lively.PartsBin.getPart(partName, partsSpace)\n    // make the icon with 2x2 boundaries around both sides and add it to me\n    var iconStruct = this.makeIcon(this.prototypePart, this.getExtent().subPt(pt(10,10)))\n    this.iconMorph = iconStruct.icon\n    this.addMorph(this.iconMorph)\n    this.iconMorph.setPosition(iconStruct.offset.addPt(pt(5,5)))\n    // make sure it ignores all events\n    this.iconMorph.disableEvents()\n    this.setToolTip(partName)\n}","funcProperties":{"__isSmartRef__":true,"id":34},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"33":{"this":{"__isSmartRef__":true,"id":0}},"34":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sun Aug 10 2014 09:00:55 GMT-0700 (PDT)\")"},"35":{"varMapping":{"__isSmartRef__":true,"id":36},"source":"function makeIcon(aMorph, targetExtent) {\n    // create a version of aMorph that has getBounds() = (0, 0, extent) in the coordinate\n    // system of a containing rectangle.  Returns {icon: iconMorph, offset:aPoint}\n    // such that \n    // var icon = makeIcon(aMorph, targetExtent)\n    // this.addMorph(icon.icon)\n    // icon.icon.setPosition(icon.offset)\n    // puts the top-left corner of the icon at (0, 0) in the local coordinate system.\n    // As nearly as I can tell, this works for most morphs...\n\n    var icon = aMorph.copy()\n    var boundsExtent = icon.getBounds().extent()\n    var scaleFactorX = targetExtent.x/boundsExtent.x;\n    var scaleFactorY = targetExtent.y/boundsExtent.y;\n    var scaleFactor = scaleFactorX < scaleFactorY?scaleFactorX:scaleFactorY;\n    icon.scaleBy(scaleFactor) //setExtent() doesn't work for many Morphs\n    return {icon:icon, offset:icon.getPosition().subPt(icon.getBounds().topLeft())}\n    \n}","funcProperties":{"__isSmartRef__":true,"id":37},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"36":{"this":{"__isSmartRef__":true,"id":0}},"37":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sat Aug 09 2014 20:52:05 GMT-0700 (PDT)\")"},"38":{"varMapping":{"__isSmartRef__":true,"id":39},"source":"function onMouseDown(evt) {\n    var newMorph = this.prototypePart.copy()\n    if (this.targetMorph) {\n        this.targetMorph.addMorph(newMorph) \n    } else {\n        newMorph.openInWorld()\n    }\n    newMorph.setPosition(pt(50, 50))\n    \n}","funcProperties":{"__isSmartRef__":true,"id":44},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"39":{"this":{"__isSmartRef__":true,"id":0},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":40}},"40":{"$super":{"__isSmartRef__":true,"id":41}},"41":{"varMapping":{"__isSmartRef__":true,"id":42},"source":"function () {\n                try {\n                    // FIXME super is supposed to be static\n                    return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n                } catch (e) {\n                    if ($world)\n                        $world.logError(e, 'Error in $super call')\n                    else\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                    return null;\n                }\n            }","funcProperties":{"__isSmartRef__":true,"id":43},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"42":{"obj":{"__isSmartRef__":true,"id":0},"name":"onMouseDown"},"43":{},"44":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sun Aug 10 2014 00:47:39 GMT-0700 (PDT)\")"},"45":{"varMapping":{"__isSmartRef__":true,"id":46},"source":"function clear() {\n    // this.initWithPart('Ellipse', 'PartsBin/Basic')\n    this.partName = null\n    this.partsSpace = null\n    this.prototypePart = null\n    this.iconMorph = null\n    this.targetMorph = null\n    this.removeAllMorphs()\n    this.setToolTip(null)\n}","funcProperties":{"__isSmartRef__":true,"id":47},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"46":{"this":{"__isSmartRef__":true,"id":0}},"47":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sun Aug 10 2014 01:54:17 GMT-0700 (PDT)\")"},"48":{"varMapping":{"__isSmartRef__":true,"id":49},"source":"function setTargetMorph(aMorph) {\n    this.targetMorph = aMorph\n    \n}","funcProperties":{"__isSmartRef__":true,"id":50},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"49":{"this":{"__isSmartRef__":true,"id":0}},"50":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sun Aug 10 2014 00:48:04 GMT-0700 (PDT)\")"},"51":{"varMapping":{"__isSmartRef__":true,"id":52},"source":"function clearTargetMorph() {\n    this.targetMorph = null\n    \n}","funcProperties":{"__isSmartRef__":true,"id":53},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"52":{"this":{"__isSmartRef__":true,"id":0}},"53":{"__serializedExpressions__":["timestamp"],"user":"rick","timestamp":"new Date(\"Sun Aug 10 2014 00:48:44 GMT-0700 (PDT)\")"},"isSimplifiedRegistry":true}}