{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":78},{"__isSmartRef__":true,"id":95}],"scripts":[],"id":"6ADEB26F-C38D-4690-A2BD-CBA0FE4629F8","shape":{"__isSmartRef__":true,"id":824},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"KaleidoscopeMaker","partsBinMetaInfo":{"__isSmartRef__":true,"id":825},"eventHandler":{"__isSmartRef__":true,"id":853},"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","B65A793B-93E8-4A42-B6BF-E8397231DB9B"],"partTests":{"__isSmartRef__":true,"id":854},"_ClipMode":"visible","moved":true,"isBeingDragged":false,"radius":400,"nFold":5,"needsUpdate":false,"displayMorph":{"__isSmartRef__":true,"id":167},"guideLine":{"__isSmartRef__":true,"id":859},"prevScroll":[0,0],"master":{"__isSmartRef__":true,"id":95},"symmetryButton":{"__isSmartRef__":true,"id":78},"__serializedExpressions__":["_Position","distanceToDragEvent"],"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":870},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","distanceToDragEvent":"lively.pt(244.0,-5.0)"},"1":{"submorphs":[],"scripts":[],"id":"8CE482C8-E408-4DD3-A14D-CB8FE2353357","shape":{"__isSmartRef__":true,"id":2},"__layered_droppingEnabled__":true,"halosEnabled":true,"eventHandler":{"__isSmartRef__":true,"id":14},"showsHalos":false,"name":"CommanderTrait","partsBinMetaInfo":{"__isSmartRef__":true,"id":15},"controlPoints":[{"__isSmartRef__":true,"id":21},{"__isSmartRef__":true,"id":22},{"__isSmartRef__":true,"id":23},{"__isSmartRef__":true,"id":24},{"__isSmartRef__":true,"id":25},{"__isSmartRef__":true,"id":26},{"__isSmartRef__":true,"id":27},{"__isSmartRef__":true,"id":28},{"__isSmartRef__":true,"id":29},{"__isSmartRef__":true,"id":30},{"__isSmartRef__":true,"id":31}],"layout":{"__isSmartRef__":true,"id":32},"_ClipMode":"visible","isBeingDragged":false,"derivationIds":[1630,"D0C9B8B6-1252-42B9-A8F2-8407CF7E08AE","166A65DA-236E-4BB6-A3FA-2F91961501E6","0A0B4BBD-45E2-4A50-B7AB-3C5869665545","A864F251-4CAF-49FB-8F27-E3F52656D2AC"],"moved":true,"prevScroll":[0,0],"commandedClones":[],"methodsWrappedForClones":["setFill","morphicSetter"],"#startLetters":"setFill","owner":{"__isSmartRef__":true,"id":0},"eventsAreIgnored":true,"__serializedExpressions__":["_Position","distanceToDragEvent"],"_Rotation":2.8736773725336153,"_Scale":0.2341502441118476,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":33},"__LivelyClassName__":"lively.morphic.Path","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs","withLayers":["Global.NoMagnetsLayer"],"_Position":"lively.pt(161.9,423.1)","distanceToDragEvent":"lively.pt(-15.7,-57.5)"},"2":{"dontChangeShape":false,"cachedVertices":[],"_PathElements":[{"__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}],"_BorderWidth":0.444,"_BorderRadius":0,"_Opacity":0.0296,"_BorderStyle":"solid","_ClipMode":"visible","_AppearanceStylingMode":false,"_BorderStylingMode":false,"__serializedExpressions__":["_Position","_Extent","_BorderColor","_Fill","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Path","__SourceModuleName__":"Global.lively.morphic.PathShapes","_Position":"lively.pt(-101.0,-96.1)","_Extent":"lively.pt(181.9,191.2)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(122,122,15)","_Padding":"lively.rect(0,0,0,0)"},"3":{"isAbsolute":true,"x":39,"y":0,"__LivelyClassName__":"lively.morphic.Shapes.MoveTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"4":{"isAbsolute":true,"x":80.90169943749474,"y":58.778525229247315,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"5":{"isAbsolute":true,"x":12.051662780622951,"y":37.091204135510985,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"6":{"isAbsolute":true,"x":-30.901699437494734,"y":95.10565162951536,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"7":{"isAbsolute":true,"x":-31.551662780622944,"y":22.923624839406457,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"8":{"isAbsolute":true,"x":-100,"y":1.2246063538223773e-14,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"9":{"isAbsolute":true,"x":-31.551662780622955,"y":-22.923624839406447,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"10":{"isAbsolute":true,"x":-30.901699437494756,"y":-95.10565162951535,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"11":{"isAbsolute":true,"x":12.051662780622943,"y":-37.09120413551099,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"12":{"isAbsolute":true,"x":80.90169943749473,"y":-58.778525229247336,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"13":{"isAbsolute":true,"x":39,"y":-9.551929559814543e-15,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"14":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"15":{"requiredModules":[],"migrationLevel":4,"partsSpaceName":"PartsBin/Tools/","partName":"CommanderTrait","comment":"This object defines a -commander- trait in the style of the original CommanderTurtle in Smalltalk.  It keeps track of its clones, and forwards appropriate state-changing methods (wrappedMethods) to them.  Note that it applies to an entire morphic structure.\nThis is used for the replication in the Kaleidoscope\n","changes":[{"__isSmartRef__":true,"id":16},{"__isSmartRef__":true,"id":18}],"lastModifiedDate":{"__isSmartRef__":true,"id":20},"revisionOnLoad":195075,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"16":{"date":{"__isSmartRef__":true,"id":17},"author":"Fern","message":"no comment","id":"209710A4-1E91-4E84-B078-317116079785"},"17":{"isSerializedDate":true,"string":"Wed Jul 25 2012 14:52:58 GMT-0700 (PDT)"},"18":{"date":{"__isSmartRef__":true,"id":19},"author":"Dan","message":"no comment","id":"A9A0EAB8-624D-4320-8647-C1088DDFD65A"},"19":{"isSerializedDate":true,"string":"Sat Apr 13 2013 10:52:40 GMT-0700 (PDT)"},"20":{"isSerializedDate":true,"string":"Sat Apr 13 2013 10:49:43 GMT-0700 (PDT)"},"21":{"morph":{"__isSmartRef__":true,"id":1},"index":0,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"22":{"morph":{"__isSmartRef__":true,"id":1},"index":1,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"23":{"morph":{"__isSmartRef__":true,"id":1},"index":2,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"24":{"morph":{"__isSmartRef__":true,"id":1},"index":3,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"25":{"morph":{"__isSmartRef__":true,"id":1},"index":4,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"26":{"morph":{"__isSmartRef__":true,"id":1},"index":5,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"27":{"morph":{"__isSmartRef__":true,"id":1},"index":6,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"28":{"morph":{"__isSmartRef__":true,"id":1},"index":7,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"29":{"morph":{"__isSmartRef__":true,"id":1},"index":8,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"30":{"morph":{"__isSmartRef__":true,"id":1},"index":9,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"31":{"morph":{"__isSmartRef__":true,"id":1},"index":10,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"32":{},"33":{"aboutMe":{"__isSmartRef__":true,"id":34},"beCommanderMorph":{"__isSmartRef__":true,"id":38},"makeNewClone":{"__isSmartRef__":true,"id":42},"yetToDo":{"__isSmartRef__":true,"id":46},"prepareToCommand":{"__isSmartRef__":true,"id":50},"wrapForClones":{"__isSmartRef__":true,"id":54},"unwrapForClones":{"__isSmartRef__":true,"id":58},"testing":{"__isSmartRef__":true,"id":62},"copyTraitTo":{"__isSmartRef__":true,"id":66},"removeCloneReferences":{"__isSmartRef__":true,"id":70},"wrapAddMorph":{"__isSmartRef__":true,"id":74}},"34":{"varMapping":{"__isSmartRef__":true,"id":35},"source":"function aboutMe() {\n    // This object defines a -commander- trait in the style of the \n    // original CommanderTurtle in Smalltalk\n    // It keeps track of its clones, and forwards appropriate\n    // state-changing methods (wrappedMethods) to them\n    // Note that it applies to an entire morphic structure\n    // This is used for the replication in the Kaleidoscope\n}","funcProperties":{"__isSmartRef__":true,"id":36},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"35":{"this":{"__isSmartRef__":true,"id":1}},"36":{"timestamp":{"__isSmartRef__":true,"id":37},"user":"Dan","tags":[]},"37":{"isSerializedDate":true,"string":"Sat Apr 13 2013 10:46:40 GMT-0700 (PDT)"},"38":{"varMapping":{"__isSmartRef__":true,"id":39},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":40},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"39":{"this":{"__isSmartRef__":true,"id":1}},"40":{"timestamp":{"__isSmartRef__":true,"id":41},"user":"Dan","tags":[]},"41":{"isSerializedDate":true,"string":"Sun Mar 24 2013 11:09:50 GMT-0700 (PDT)"},"42":{"varMapping":{"__isSmartRef__":true,"id":43},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":44},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"43":{"this":{"__isSmartRef__":true,"id":1}},"44":{"timestamp":{"__isSmartRef__":true,"id":45},"user":"Dan","tags":[]},"45":{"isSerializedDate":true,"string":"Thu Mar 21 2013 15:08:04 GMT-0700 (PDT)"},"46":{"varMapping":{"__isSmartRef__":true,"id":47},"source":"function yetToDo() {\n    // [X] Write the actual wrap and unwrap code\n    // [X] Save the world and execute...\n    // [X] this.beCommanderMorph();  // should not crash\n    // [X] this.makeNewClone().openInWorld();  // make another on top\n    // [X] move the new copy where it can be seen\n    // [X] this.setFill(Color.green);  // should do this and clone\n    // [X] make another clone, move it and change color again\n    // [X] this.beCommanderMorph();  // should be able to repeat\n    // [X] this.beCommanderMorph();  // add \"morphicSetter\"\n    // [X] Test it out for, eg, transformation, fill, etc\n    // [X] Make a new Kaleidoscope using clones\n    // [X] Handle, eg, addMorph and remove\n    // [ ] Make sure it works recursively - that clones can be commanders\n    // [ ] Package up as a trait or method with local methods\n}","funcProperties":{"__isSmartRef__":true,"id":48},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"47":{"this":{"__isSmartRef__":true,"id":1}},"48":{"timestamp":{"__isSmartRef__":true,"id":49},"user":"Dan","tags":[]},"49":{"isSerializedDate":true,"string":"Sun Mar 24 2013 16:23:00 GMT-0700 (PDT)"},"50":{"varMapping":{"__isSmartRef__":true,"id":51},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":52},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"51":{"this":{"__isSmartRef__":true,"id":1}},"52":{"timestamp":{"__isSmartRef__":true,"id":53},"user":"Dan","tags":[]},"53":{"isSerializedDate":true,"string":"Sat Apr 13 2013 11:40:14 GMT-0700 (PDT)"},"54":{"varMapping":{"__isSmartRef__":true,"id":55},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":56},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"55":{"this":{"__isSmartRef__":true,"id":1}},"56":{"timestamp":{"__isSmartRef__":true,"id":57},"user":"Dan","tags":[]},"57":{"isSerializedDate":true,"string":"Mon Mar 25 2013 23:33:35 GMT-0700 (PDT)"},"58":{"varMapping":{"__isSmartRef__":true,"id":59},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":60},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"59":{"this":{"__isSmartRef__":true,"id":1}},"60":{"timestamp":{"__isSmartRef__":true,"id":61},"user":"Dan","tags":[]},"61":{"isSerializedDate":true,"string":"Tue Mar 12 2013 12:17:51 GMT-0700 (PDT)"},"62":{"varMapping":{"__isSmartRef__":true,"id":63},"source":"function testing() {\n    // this.beCommanderMorph()\n    // this.makeNewClone().openInWorld()\n    // this.removeAllCLones()\n}","funcProperties":{"__isSmartRef__":true,"id":64},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"63":{"this":{"__isSmartRef__":true,"id":1}},"64":{"timestamp":{"__isSmartRef__":true,"id":65},"user":"Dan","tags":[]},"65":{"isSerializedDate":true,"string":"Sat Apr 13 2013 10:40:18 GMT-0700 (PDT)"},"66":{"varMapping":{"__isSmartRef__":true,"id":67},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":68},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"67":{"this":{"__isSmartRef__":true,"id":1}},"68":{"timestamp":{"__isSmartRef__":true,"id":69},"user":"Dan","tags":[]},"69":{"isSerializedDate":true,"string":"Sat Apr 13 2013 11:42:20 GMT-0700 (PDT)"},"70":{"varMapping":{"__isSmartRef__":true,"id":71},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":72},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"71":{"this":{"__isSmartRef__":true,"id":1}},"72":{"timestamp":{"__isSmartRef__":true,"id":73},"user":"Dan","tags":[]},"73":{"isSerializedDate":true,"string":"Sun Mar 24 2013 08:51:17 GMT-0700 (PDT)"},"74":{"varMapping":{"__isSmartRef__":true,"id":75},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":76},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"75":{"this":{"__isSmartRef__":true,"id":1}},"76":{"timestamp":{"__isSmartRef__":true,"id":77},"user":"Dan","tags":[]},"77":{"isSerializedDate":true,"string":"Mon Mar 25 2013 23:05:10 GMT-0700 (PDT)"},"78":{"submorphs":[{"__isSmartRef__":true,"id":79}],"scripts":[],"shape":{"__isSmartRef__":true,"id":84},"eventHandler":{"__isSmartRef__":true,"id":85},"_ClipMode":"visible","derivationIds":["B58086B4-DF72-40C2-9289-67B2B64A07C8"],"id":"CA07FD5A-8A3D-4FDF-80DD-4AC2B57775D0","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"value":false,"toggle":false,"isActive":true,"label":{"__isSmartRef__":true,"id":79},"_PreviousBorderWidth":1,"owner":{"__isSmartRef__":true,"id":0},"isPressed":true,"__serializedExpressions__":["_Position"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":86},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(250.0,415.0)"},"79":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":80},"_WhiteSpaceHandling":"pre-wrap","textChunks":[{"__isSmartRef__":true,"id":81}],"eventHandler":{"__isSmartRef__":true,"id":83},"_ClipMode":"hidden","derivationIds":["3AAD3D50-80BD-4F87-B4EF-72379C142150"],"id":"AD9F994E-C43D-4B91-A944-0DE74C3669D0","grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WordBreak":"break-all","fixedHeight":true,"_InputAllowed":false,"_HandStyle":"default","allowInput":false,"_FontFamily":"Helvetica","_FontSize":10,"evalEnabled":false,"owner":{"__isSmartRef__":true,"id":78},"isLabel":true,"_Align":"center","eventsAreIgnored":true,"_TextStylingMode":true,"__serializedExpressions__":["_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_TextColor":"Color.rgb(0,0,0)"},"80":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(100.0,20.0)","_Padding":"lively.rect(0,3,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"81":{"style":{"__isSmartRef__":true,"id":82},"chunkOwner":{"__isSmartRef__":true,"id":79},"_id":"_368","storedString":"set symmetry","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"82":{"textShadow":"0px 1px 0 rgba(255,255,255,1)","__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"83":{"morph":{"__isSmartRef__":true,"id":79},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"84":{"_BorderWidth":1,"_BorderRadius":5,"_AppearanceStylingMode":true,"_BorderStylingMode":true,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(100.0,20.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(189,190,192)"},"85":{"morph":{"__isSmartRef__":true,"id":78},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"86":{"onMouseUp":{"__isSmartRef__":true,"id":87}},"87":{"varMapping":{"__isSmartRef__":true,"id":88},"source":"function onMouseUp(evt) {this.owner.setSymmetry(evt)}","funcProperties":{"__isSmartRef__":true,"id":93},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"88":{"this":{"__isSmartRef__":true,"id":78},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":89}},"89":{"$super":{"__isSmartRef__":true,"id":90}},"90":{"varMapping":{"__isSmartRef__":true,"id":91},"source":"function () {\n                    try {\n                        return obj.constructor.prototype[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":92},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"91":{"obj":{"__isSmartRef__":true,"id":78},"name":"onMouseUp"},"92":{},"93":{"timestamp":{"__isSmartRef__":true,"id":94},"user":"Dan"},"94":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:03:38 GMT-0700 (PDT)"},"95":{"submorphs":[{"__isSmartRef__":true,"id":96}],"scripts":[],"shape":{"__isSmartRef__":true,"id":794},"eventHandler":{"__isSmartRef__":true,"id":795},"_ClipMode":"hidden","derivationIds":[],"id":"7B66074A-9F31-4E1B-9E51-F28D233E5455","droppingEnabled":true,"halosEnabled":true,"__serializedExpressions__":["_Position"],"eventsAreIgnored":true,"_Rotation":0.9424777960769379,"name":"slice","owner":{"__isSmartRef__":true,"id":0},"commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432},{"__isSmartRef__":true,"id":498},{"__isSmartRef__":true,"id":564},{"__isSmartRef__":true,"id":630},{"__isSmartRef__":true,"id":696}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":796},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"96":{"submorphs":[{"__isSmartRef__":true,"id":97}],"scripts":[],"shape":{"__isSmartRef__":true,"id":792},"eventHandler":{"__isSmartRef__":true,"id":793},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"7331735F-8D0D-4947-B652-32B5670B319C","droppingEnabled":true,"halosEnabled":true,"__serializedExpressions__":["_Position"],"name":"Box1","owner":{"__isSmartRef__":true,"id":95},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":433},{"__isSmartRef__":true,"id":499},{"__isSmartRef__":true,"id":565},{"__isSmartRef__":true,"id":631},{"__isSmartRef__":true,"id":697}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"97":{"submorphs":[],"scripts":[],"id":"852AB695-C2D1-41DF-BB84-328F72060F7E","shape":{"__isSmartRef__":true,"id":98},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":99},"eventHandler":{"__isSmartRef__":true,"id":123},"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","19D9252C-E261-4DAD-8766-214094927866"],"partTests":{"__isSmartRef__":true,"id":124},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":96},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":434},{"__isSmartRef__":true,"id":500},{"__isSmartRef__":true,"id":566},{"__isSmartRef__":true,"id":632},{"__isSmartRef__":true,"id":698}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","distanceToDragEvent"],"_Rotation":0.7853981633974485,"_Scale":1,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"98":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"99":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":100},{"__isSmartRef__":true,"id":102},{"__isSmartRef__":true,"id":104},{"__isSmartRef__":true,"id":106},{"__isSmartRef__":true,"id":108},{"__isSmartRef__":true,"id":110},{"__isSmartRef__":true,"id":112},{"__isSmartRef__":true,"id":114},{"__isSmartRef__":true,"id":116},{"__isSmartRef__":true,"id":118},{"__isSmartRef__":true,"id":120}],"lastModifiedDate":{"__isSmartRef__":true,"id":122},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"100":{"date":{"__isSmartRef__":true,"id":101},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"101":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"102":{"date":{"__isSmartRef__":true,"id":103},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"103":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"104":{"date":{"__isSmartRef__":true,"id":105},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"105":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"106":{"date":{"__isSmartRef__":true,"id":107},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"107":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"108":{"date":{"__isSmartRef__":true,"id":109},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"109":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"110":{"date":{"__isSmartRef__":true,"id":111},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"111":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"112":{"date":{"__isSmartRef__":true,"id":113},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"113":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"114":{"date":{"__isSmartRef__":true,"id":115},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"115":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"116":{"date":{"__isSmartRef__":true,"id":117},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"117":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"118":{"date":{"__isSmartRef__":true,"id":119},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"119":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"120":{"date":{"__isSmartRef__":true,"id":121},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"121":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"122":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"123":{"morph":{"__isSmartRef__":true,"id":97},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"124":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":125}},"125":{"test01IsMorph":{"__isSmartRef__":true,"id":126}},"126":{"varMapping":{"__isSmartRef__":true,"id":127},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":128},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"127":{"this":{"__isSmartRef__":true,"id":124}},"128":{},"129":{"submorphs":[],"scripts":[],"id":"E9A7B258-93E1-4693-B3F4-02E0A2F3A555","shape":{"__isSmartRef__":true,"id":130},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":131},"eventHandler":{"__isSmartRef__":true,"id":155},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":156},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":161},"isBeingDragged":false,"commandedClones":[],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":1,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"130":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"131":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":132},{"__isSmartRef__":true,"id":134},{"__isSmartRef__":true,"id":136},{"__isSmartRef__":true,"id":138},{"__isSmartRef__":true,"id":140},{"__isSmartRef__":true,"id":142},{"__isSmartRef__":true,"id":144},{"__isSmartRef__":true,"id":146},{"__isSmartRef__":true,"id":148},{"__isSmartRef__":true,"id":150},{"__isSmartRef__":true,"id":152}],"lastModifiedDate":{"__isSmartRef__":true,"id":154},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"132":{"date":{"__isSmartRef__":true,"id":133},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"133":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"134":{"date":{"__isSmartRef__":true,"id":135},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"135":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"136":{"date":{"__isSmartRef__":true,"id":137},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"137":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"138":{"date":{"__isSmartRef__":true,"id":139},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"139":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"140":{"date":{"__isSmartRef__":true,"id":141},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"141":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"142":{"date":{"__isSmartRef__":true,"id":143},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"143":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"144":{"date":{"__isSmartRef__":true,"id":145},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"145":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"146":{"date":{"__isSmartRef__":true,"id":147},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"147":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"148":{"date":{"__isSmartRef__":true,"id":149},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"149":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"150":{"date":{"__isSmartRef__":true,"id":151},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"151":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"152":{"date":{"__isSmartRef__":true,"id":153},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"153":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"154":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"155":{"morph":{"__isSmartRef__":true,"id":129},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"156":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":157}},"157":{"test01IsMorph":{"__isSmartRef__":true,"id":158}},"158":{"varMapping":{"__isSmartRef__":true,"id":159},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":160},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"159":{"this":{"__isSmartRef__":true,"id":156}},"160":{},"161":{"submorphs":[{"__isSmartRef__":true,"id":129}],"scripts":[],"shape":{"__isSmartRef__":true,"id":162},"eventHandler":{"__isSmartRef__":true,"id":163},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"2967E61E-40C9-4F07-959E-EB2F2CA1AC10","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":164},"_Rotation":-0.9424777960769379,"commandedClones":[],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":10,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"162":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"163":{"morph":{"__isSmartRef__":true,"id":161},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"164":{"submorphs":[{"__isSmartRef__":true,"id":161}],"scripts":[],"shape":{"__isSmartRef__":true,"id":165},"eventHandler":{"__isSmartRef__":true,"id":166},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"6702A774-86C9-4DE3-A750-D9FCB94A6F29","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":2.199114857512855,"name":"slice1","commandedClones":[],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":19,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":764},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"165":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"166":{"morph":{"__isSmartRef__":true,"id":164},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"167":{"submorphs":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432},{"__isSmartRef__":true,"id":498},{"__isSmartRef__":true,"id":564},{"__isSmartRef__":true,"id":630},{"__isSmartRef__":true,"id":696}],"scripts":[],"shape":{"__isSmartRef__":true,"id":762},"eventHandler":{"__isSmartRef__":true,"id":763},"_ClipMode":"visible","derivationIds":[],"id":"443DBDAD-092E-44D1-9144-BC96C1D142B3","droppingEnabled":true,"halosEnabled":true,"__serializedExpressions__":["_Position"],"eventsAreIgnored":true,"__LivelyClassName__":"lively.morphic.Morph","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(410.0,410.0)"},"168":{"submorphs":[{"__isSmartRef__":true,"id":169}],"scripts":[],"shape":{"__isSmartRef__":true,"id":204},"eventHandler":{"__isSmartRef__":true,"id":205},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"C8CA66CB-B96B-4502-BC11-8E2E6F3D25DE","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":0.3141592653589793,"name":"slice2","commandedClones":[{"__isSmartRef__":true,"id":164}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","_Scale"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":20,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":206},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","_Scale":"lively.pt(-1.0,1.0)"},"169":{"submorphs":[{"__isSmartRef__":true,"id":170}],"scripts":[],"shape":{"__isSmartRef__":true,"id":202},"eventHandler":{"__isSmartRef__":true,"id":203},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"85AA2F30-7841-4C69-BE2F-A2CB6CAD4BE0","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":168},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":11,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"170":{"submorphs":[],"scripts":[],"id":"BE8B894B-04FC-43B2-810A-92EBD41377E0","shape":{"__isSmartRef__":true,"id":171},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":172},"eventHandler":{"__isSmartRef__":true,"id":196},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":197},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":169},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":2,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"171":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"172":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":173},{"__isSmartRef__":true,"id":175},{"__isSmartRef__":true,"id":177},{"__isSmartRef__":true,"id":179},{"__isSmartRef__":true,"id":181},{"__isSmartRef__":true,"id":183},{"__isSmartRef__":true,"id":185},{"__isSmartRef__":true,"id":187},{"__isSmartRef__":true,"id":189},{"__isSmartRef__":true,"id":191},{"__isSmartRef__":true,"id":193}],"lastModifiedDate":{"__isSmartRef__":true,"id":195},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"173":{"date":{"__isSmartRef__":true,"id":174},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"174":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"175":{"date":{"__isSmartRef__":true,"id":176},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"176":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"177":{"date":{"__isSmartRef__":true,"id":178},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"178":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"179":{"date":{"__isSmartRef__":true,"id":180},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"180":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"181":{"date":{"__isSmartRef__":true,"id":182},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"182":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"183":{"date":{"__isSmartRef__":true,"id":184},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"184":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"185":{"date":{"__isSmartRef__":true,"id":186},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"186":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"187":{"date":{"__isSmartRef__":true,"id":188},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"188":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"189":{"date":{"__isSmartRef__":true,"id":190},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"190":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"191":{"date":{"__isSmartRef__":true,"id":192},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"192":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"193":{"date":{"__isSmartRef__":true,"id":194},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"194":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"195":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"196":{"morph":{"__isSmartRef__":true,"id":170},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"197":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":198}},"198":{"test01IsMorph":{"__isSmartRef__":true,"id":199}},"199":{"varMapping":{"__isSmartRef__":true,"id":200},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":201},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"200":{"this":{"__isSmartRef__":true,"id":197}},"201":{},"202":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"203":{"morph":{"__isSmartRef__":true,"id":169},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"204":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"205":{"morph":{"__isSmartRef__":true,"id":168},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"206":{"innerMorph":{"__isSmartRef__":true,"id":207},"beCommanderMorph":{"__isSmartRef__":true,"id":210},"copyTraitTo":{"__isSmartRef__":true,"id":213},"makeNewClone":{"__isSmartRef__":true,"id":216},"prepareToCommand":{"__isSmartRef__":true,"id":219},"removeCloneReferences":{"__isSmartRef__":true,"id":222},"unwrapForClones":{"__isSmartRef__":true,"id":225},"wrapForClones":{"__isSmartRef__":true,"id":228},"wrapAddMorph":{"__isSmartRef__":true,"id":231}},"207":{"varMapping":{"__isSmartRef__":true,"id":208},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":209},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"208":{"this":{"__isSmartRef__":true,"id":168}},"209":{},"210":{"varMapping":{"__isSmartRef__":true,"id":211},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":212},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"211":{"this":{"__isSmartRef__":true,"id":168}},"212":{},"213":{"varMapping":{"__isSmartRef__":true,"id":214},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":215},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"214":{"this":{"__isSmartRef__":true,"id":168}},"215":{},"216":{"varMapping":{"__isSmartRef__":true,"id":217},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":218},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"217":{"this":{"__isSmartRef__":true,"id":168}},"218":{},"219":{"varMapping":{"__isSmartRef__":true,"id":220},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":221},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"220":{"this":{"__isSmartRef__":true,"id":168}},"221":{},"222":{"varMapping":{"__isSmartRef__":true,"id":223},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":224},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"223":{"this":{"__isSmartRef__":true,"id":168}},"224":{},"225":{"varMapping":{"__isSmartRef__":true,"id":226},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":227},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"226":{"this":{"__isSmartRef__":true,"id":168}},"227":{},"228":{"varMapping":{"__isSmartRef__":true,"id":229},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":230},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"229":{"this":{"__isSmartRef__":true,"id":168}},"230":{},"231":{"varMapping":{"__isSmartRef__":true,"id":232},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":233},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"232":{"this":{"__isSmartRef__":true,"id":168}},"233":{},"234":{"submorphs":[{"__isSmartRef__":true,"id":235}],"scripts":[],"shape":{"__isSmartRef__":true,"id":270},"eventHandler":{"__isSmartRef__":true,"id":271},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"071A28E4-7E4C-4FDE-B5FA-6BD79BD5F289","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":3.4557519189487724,"name":"slice3","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":21,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":272},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"235":{"submorphs":[{"__isSmartRef__":true,"id":236}],"scripts":[],"shape":{"__isSmartRef__":true,"id":268},"eventHandler":{"__isSmartRef__":true,"id":269},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"E7365D8C-FC3E-4C0C-9D75-5FECDE37F954","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":234},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":12,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"236":{"submorphs":[],"scripts":[],"id":"EF04CD77-7D3C-4324-9EC8-AD30EFE47477","shape":{"__isSmartRef__":true,"id":237},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":238},"eventHandler":{"__isSmartRef__":true,"id":262},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":263},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":235},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":3,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"237":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"238":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":239},{"__isSmartRef__":true,"id":241},{"__isSmartRef__":true,"id":243},{"__isSmartRef__":true,"id":245},{"__isSmartRef__":true,"id":247},{"__isSmartRef__":true,"id":249},{"__isSmartRef__":true,"id":251},{"__isSmartRef__":true,"id":253},{"__isSmartRef__":true,"id":255},{"__isSmartRef__":true,"id":257},{"__isSmartRef__":true,"id":259}],"lastModifiedDate":{"__isSmartRef__":true,"id":261},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"239":{"date":{"__isSmartRef__":true,"id":240},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"240":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"241":{"date":{"__isSmartRef__":true,"id":242},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"242":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"243":{"date":{"__isSmartRef__":true,"id":244},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"244":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"245":{"date":{"__isSmartRef__":true,"id":246},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"246":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"247":{"date":{"__isSmartRef__":true,"id":248},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"248":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"249":{"date":{"__isSmartRef__":true,"id":250},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"250":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"251":{"date":{"__isSmartRef__":true,"id":252},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"252":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"253":{"date":{"__isSmartRef__":true,"id":254},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"254":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"255":{"date":{"__isSmartRef__":true,"id":256},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"256":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"257":{"date":{"__isSmartRef__":true,"id":258},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"258":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"259":{"date":{"__isSmartRef__":true,"id":260},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"260":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"261":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"262":{"morph":{"__isSmartRef__":true,"id":236},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"263":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":264}},"264":{"test01IsMorph":{"__isSmartRef__":true,"id":265}},"265":{"varMapping":{"__isSmartRef__":true,"id":266},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":267},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"266":{"this":{"__isSmartRef__":true,"id":263}},"267":{},"268":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"269":{"morph":{"__isSmartRef__":true,"id":235},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"270":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"271":{"morph":{"__isSmartRef__":true,"id":234},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"272":{"innerMorph":{"__isSmartRef__":true,"id":273},"beCommanderMorph":{"__isSmartRef__":true,"id":276},"copyTraitTo":{"__isSmartRef__":true,"id":279},"makeNewClone":{"__isSmartRef__":true,"id":282},"prepareToCommand":{"__isSmartRef__":true,"id":285},"removeCloneReferences":{"__isSmartRef__":true,"id":288},"unwrapForClones":{"__isSmartRef__":true,"id":291},"wrapForClones":{"__isSmartRef__":true,"id":294},"wrapAddMorph":{"__isSmartRef__":true,"id":297}},"273":{"varMapping":{"__isSmartRef__":true,"id":274},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":275},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"274":{"this":{"__isSmartRef__":true,"id":234}},"275":{},"276":{"varMapping":{"__isSmartRef__":true,"id":277},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":278},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"277":{"this":{"__isSmartRef__":true,"id":234}},"278":{},"279":{"varMapping":{"__isSmartRef__":true,"id":280},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":281},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"280":{"this":{"__isSmartRef__":true,"id":234}},"281":{},"282":{"varMapping":{"__isSmartRef__":true,"id":283},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":284},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"283":{"this":{"__isSmartRef__":true,"id":234}},"284":{},"285":{"varMapping":{"__isSmartRef__":true,"id":286},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":287},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"286":{"this":{"__isSmartRef__":true,"id":234}},"287":{},"288":{"varMapping":{"__isSmartRef__":true,"id":289},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":290},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"289":{"this":{"__isSmartRef__":true,"id":234}},"290":{},"291":{"varMapping":{"__isSmartRef__":true,"id":292},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":293},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"292":{"this":{"__isSmartRef__":true,"id":234}},"293":{},"294":{"varMapping":{"__isSmartRef__":true,"id":295},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":296},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"295":{"this":{"__isSmartRef__":true,"id":234}},"296":{},"297":{"varMapping":{"__isSmartRef__":true,"id":298},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":299},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"298":{"this":{"__isSmartRef__":true,"id":234}},"299":{},"300":{"submorphs":[{"__isSmartRef__":true,"id":301}],"scripts":[],"shape":{"__isSmartRef__":true,"id":336},"eventHandler":{"__isSmartRef__":true,"id":337},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"02643466-185D-429A-9A15-B82CF3F20EC2","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":1.5707963267948966,"name":"slice4","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","_Scale"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":22,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":338},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","_Scale":"lively.pt(-1.0,1.0)"},"301":{"submorphs":[{"__isSmartRef__":true,"id":302}],"scripts":[],"shape":{"__isSmartRef__":true,"id":334},"eventHandler":{"__isSmartRef__":true,"id":335},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"B61A216B-F5E0-4E19-B85E-50575752E641","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":300},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":13,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"302":{"submorphs":[],"scripts":[],"id":"D7F97D9C-D855-49A0-BAA3-76672AA51766","shape":{"__isSmartRef__":true,"id":303},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":304},"eventHandler":{"__isSmartRef__":true,"id":328},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":329},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":301},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":4,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"303":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"304":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":305},{"__isSmartRef__":true,"id":307},{"__isSmartRef__":true,"id":309},{"__isSmartRef__":true,"id":311},{"__isSmartRef__":true,"id":313},{"__isSmartRef__":true,"id":315},{"__isSmartRef__":true,"id":317},{"__isSmartRef__":true,"id":319},{"__isSmartRef__":true,"id":321},{"__isSmartRef__":true,"id":323},{"__isSmartRef__":true,"id":325}],"lastModifiedDate":{"__isSmartRef__":true,"id":327},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"305":{"date":{"__isSmartRef__":true,"id":306},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"306":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"307":{"date":{"__isSmartRef__":true,"id":308},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"308":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"309":{"date":{"__isSmartRef__":true,"id":310},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"310":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"311":{"date":{"__isSmartRef__":true,"id":312},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"312":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"313":{"date":{"__isSmartRef__":true,"id":314},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"314":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"315":{"date":{"__isSmartRef__":true,"id":316},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"316":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"317":{"date":{"__isSmartRef__":true,"id":318},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"318":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"319":{"date":{"__isSmartRef__":true,"id":320},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"320":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"321":{"date":{"__isSmartRef__":true,"id":322},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"322":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"323":{"date":{"__isSmartRef__":true,"id":324},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"324":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"325":{"date":{"__isSmartRef__":true,"id":326},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"326":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"327":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"328":{"morph":{"__isSmartRef__":true,"id":302},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"329":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":330}},"330":{"test01IsMorph":{"__isSmartRef__":true,"id":331}},"331":{"varMapping":{"__isSmartRef__":true,"id":332},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":333},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"332":{"this":{"__isSmartRef__":true,"id":329}},"333":{},"334":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"335":{"morph":{"__isSmartRef__":true,"id":301},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"336":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"337":{"morph":{"__isSmartRef__":true,"id":300},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"338":{"innerMorph":{"__isSmartRef__":true,"id":339},"beCommanderMorph":{"__isSmartRef__":true,"id":342},"copyTraitTo":{"__isSmartRef__":true,"id":345},"makeNewClone":{"__isSmartRef__":true,"id":348},"prepareToCommand":{"__isSmartRef__":true,"id":351},"removeCloneReferences":{"__isSmartRef__":true,"id":354},"unwrapForClones":{"__isSmartRef__":true,"id":357},"wrapForClones":{"__isSmartRef__":true,"id":360},"wrapAddMorph":{"__isSmartRef__":true,"id":363}},"339":{"varMapping":{"__isSmartRef__":true,"id":340},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":341},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"340":{"this":{"__isSmartRef__":true,"id":300}},"341":{},"342":{"varMapping":{"__isSmartRef__":true,"id":343},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":344},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"343":{"this":{"__isSmartRef__":true,"id":300}},"344":{},"345":{"varMapping":{"__isSmartRef__":true,"id":346},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":347},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"346":{"this":{"__isSmartRef__":true,"id":300}},"347":{},"348":{"varMapping":{"__isSmartRef__":true,"id":349},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":350},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"349":{"this":{"__isSmartRef__":true,"id":300}},"350":{},"351":{"varMapping":{"__isSmartRef__":true,"id":352},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":353},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"352":{"this":{"__isSmartRef__":true,"id":300}},"353":{},"354":{"varMapping":{"__isSmartRef__":true,"id":355},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":356},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"355":{"this":{"__isSmartRef__":true,"id":300}},"356":{},"357":{"varMapping":{"__isSmartRef__":true,"id":358},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":359},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"358":{"this":{"__isSmartRef__":true,"id":300}},"359":{},"360":{"varMapping":{"__isSmartRef__":true,"id":361},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":362},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"361":{"this":{"__isSmartRef__":true,"id":300}},"362":{},"363":{"varMapping":{"__isSmartRef__":true,"id":364},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":365},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"364":{"this":{"__isSmartRef__":true,"id":300}},"365":{},"366":{"submorphs":[{"__isSmartRef__":true,"id":367}],"scripts":[],"shape":{"__isSmartRef__":true,"id":402},"eventHandler":{"__isSmartRef__":true,"id":403},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"A5C9F893-2587-438F-BBDB-97FF57D6C0AF","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":4.71238898038469,"name":"slice5","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":23,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":404},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"367":{"submorphs":[{"__isSmartRef__":true,"id":368}],"scripts":[],"shape":{"__isSmartRef__":true,"id":400},"eventHandler":{"__isSmartRef__":true,"id":401},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"5FB0CF7D-4F14-49E6-A539-B00F9E138EE3","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":366},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":14,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"368":{"submorphs":[],"scripts":[],"id":"C2D2C53D-D1EA-4083-85F4-A24C165F92F1","shape":{"__isSmartRef__":true,"id":369},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":370},"eventHandler":{"__isSmartRef__":true,"id":394},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":395},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":367},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":5,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"369":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"370":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":371},{"__isSmartRef__":true,"id":373},{"__isSmartRef__":true,"id":375},{"__isSmartRef__":true,"id":377},{"__isSmartRef__":true,"id":379},{"__isSmartRef__":true,"id":381},{"__isSmartRef__":true,"id":383},{"__isSmartRef__":true,"id":385},{"__isSmartRef__":true,"id":387},{"__isSmartRef__":true,"id":389},{"__isSmartRef__":true,"id":391}],"lastModifiedDate":{"__isSmartRef__":true,"id":393},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"371":{"date":{"__isSmartRef__":true,"id":372},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"372":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"373":{"date":{"__isSmartRef__":true,"id":374},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"374":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"375":{"date":{"__isSmartRef__":true,"id":376},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"376":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"377":{"date":{"__isSmartRef__":true,"id":378},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"378":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"379":{"date":{"__isSmartRef__":true,"id":380},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"380":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"381":{"date":{"__isSmartRef__":true,"id":382},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"382":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"383":{"date":{"__isSmartRef__":true,"id":384},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"384":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"385":{"date":{"__isSmartRef__":true,"id":386},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"386":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"387":{"date":{"__isSmartRef__":true,"id":388},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"388":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"389":{"date":{"__isSmartRef__":true,"id":390},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"390":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"391":{"date":{"__isSmartRef__":true,"id":392},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"392":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"393":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"394":{"morph":{"__isSmartRef__":true,"id":368},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"395":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":396}},"396":{"test01IsMorph":{"__isSmartRef__":true,"id":397}},"397":{"varMapping":{"__isSmartRef__":true,"id":398},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":399},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"398":{"this":{"__isSmartRef__":true,"id":395}},"399":{},"400":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"401":{"morph":{"__isSmartRef__":true,"id":367},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"402":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"403":{"morph":{"__isSmartRef__":true,"id":366},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"404":{"innerMorph":{"__isSmartRef__":true,"id":405},"beCommanderMorph":{"__isSmartRef__":true,"id":408},"copyTraitTo":{"__isSmartRef__":true,"id":411},"makeNewClone":{"__isSmartRef__":true,"id":414},"prepareToCommand":{"__isSmartRef__":true,"id":417},"removeCloneReferences":{"__isSmartRef__":true,"id":420},"unwrapForClones":{"__isSmartRef__":true,"id":423},"wrapForClones":{"__isSmartRef__":true,"id":426},"wrapAddMorph":{"__isSmartRef__":true,"id":429}},"405":{"varMapping":{"__isSmartRef__":true,"id":406},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":407},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"406":{"this":{"__isSmartRef__":true,"id":366}},"407":{},"408":{"varMapping":{"__isSmartRef__":true,"id":409},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":410},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"409":{"this":{"__isSmartRef__":true,"id":366}},"410":{},"411":{"varMapping":{"__isSmartRef__":true,"id":412},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":413},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"412":{"this":{"__isSmartRef__":true,"id":366}},"413":{},"414":{"varMapping":{"__isSmartRef__":true,"id":415},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":416},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"415":{"this":{"__isSmartRef__":true,"id":366}},"416":{},"417":{"varMapping":{"__isSmartRef__":true,"id":418},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":419},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"418":{"this":{"__isSmartRef__":true,"id":366}},"419":{},"420":{"varMapping":{"__isSmartRef__":true,"id":421},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":422},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"421":{"this":{"__isSmartRef__":true,"id":366}},"422":{},"423":{"varMapping":{"__isSmartRef__":true,"id":424},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":425},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"424":{"this":{"__isSmartRef__":true,"id":366}},"425":{},"426":{"varMapping":{"__isSmartRef__":true,"id":427},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":428},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"427":{"this":{"__isSmartRef__":true,"id":366}},"428":{},"429":{"varMapping":{"__isSmartRef__":true,"id":430},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":431},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"430":{"this":{"__isSmartRef__":true,"id":366}},"431":{},"432":{"submorphs":[{"__isSmartRef__":true,"id":433}],"scripts":[],"shape":{"__isSmartRef__":true,"id":468},"eventHandler":{"__isSmartRef__":true,"id":469},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"003D671F-0227-4AA9-AA74-E04602733E0A","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":2.827433388230814,"name":"slice6","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","_Scale"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":24,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":470},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","_Scale":"lively.pt(-1.0,1.0)"},"433":{"submorphs":[{"__isSmartRef__":true,"id":434}],"scripts":[],"shape":{"__isSmartRef__":true,"id":466},"eventHandler":{"__isSmartRef__":true,"id":467},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"EBEAD49B-B3EF-4A98-B7E2-E1A3650DE832","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":432},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":15,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"434":{"submorphs":[],"scripts":[],"id":"51E91468-3AF9-49A8-8B51-1B18094DCB92","shape":{"__isSmartRef__":true,"id":435},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":436},"eventHandler":{"__isSmartRef__":true,"id":460},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":461},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":433},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":6,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"435":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"436":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":437},{"__isSmartRef__":true,"id":439},{"__isSmartRef__":true,"id":441},{"__isSmartRef__":true,"id":443},{"__isSmartRef__":true,"id":445},{"__isSmartRef__":true,"id":447},{"__isSmartRef__":true,"id":449},{"__isSmartRef__":true,"id":451},{"__isSmartRef__":true,"id":453},{"__isSmartRef__":true,"id":455},{"__isSmartRef__":true,"id":457}],"lastModifiedDate":{"__isSmartRef__":true,"id":459},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"437":{"date":{"__isSmartRef__":true,"id":438},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"438":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"439":{"date":{"__isSmartRef__":true,"id":440},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"440":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"441":{"date":{"__isSmartRef__":true,"id":442},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"442":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"443":{"date":{"__isSmartRef__":true,"id":444},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"444":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"445":{"date":{"__isSmartRef__":true,"id":446},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"446":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"447":{"date":{"__isSmartRef__":true,"id":448},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"448":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"449":{"date":{"__isSmartRef__":true,"id":450},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"450":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"451":{"date":{"__isSmartRef__":true,"id":452},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"452":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"453":{"date":{"__isSmartRef__":true,"id":454},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"454":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"455":{"date":{"__isSmartRef__":true,"id":456},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"456":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"457":{"date":{"__isSmartRef__":true,"id":458},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"458":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"459":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"460":{"morph":{"__isSmartRef__":true,"id":434},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"461":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":462}},"462":{"test01IsMorph":{"__isSmartRef__":true,"id":463}},"463":{"varMapping":{"__isSmartRef__":true,"id":464},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":465},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"464":{"this":{"__isSmartRef__":true,"id":461}},"465":{},"466":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"467":{"morph":{"__isSmartRef__":true,"id":433},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"468":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"469":{"morph":{"__isSmartRef__":true,"id":432},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"470":{"innerMorph":{"__isSmartRef__":true,"id":471},"beCommanderMorph":{"__isSmartRef__":true,"id":474},"copyTraitTo":{"__isSmartRef__":true,"id":477},"makeNewClone":{"__isSmartRef__":true,"id":480},"prepareToCommand":{"__isSmartRef__":true,"id":483},"removeCloneReferences":{"__isSmartRef__":true,"id":486},"unwrapForClones":{"__isSmartRef__":true,"id":489},"wrapForClones":{"__isSmartRef__":true,"id":492},"wrapAddMorph":{"__isSmartRef__":true,"id":495}},"471":{"varMapping":{"__isSmartRef__":true,"id":472},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":473},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"472":{"this":{"__isSmartRef__":true,"id":432}},"473":{},"474":{"varMapping":{"__isSmartRef__":true,"id":475},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":476},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"475":{"this":{"__isSmartRef__":true,"id":432}},"476":{},"477":{"varMapping":{"__isSmartRef__":true,"id":478},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":479},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"478":{"this":{"__isSmartRef__":true,"id":432}},"479":{},"480":{"varMapping":{"__isSmartRef__":true,"id":481},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":482},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"481":{"this":{"__isSmartRef__":true,"id":432}},"482":{},"483":{"varMapping":{"__isSmartRef__":true,"id":484},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":485},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"484":{"this":{"__isSmartRef__":true,"id":432}},"485":{},"486":{"varMapping":{"__isSmartRef__":true,"id":487},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":488},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"487":{"this":{"__isSmartRef__":true,"id":432}},"488":{},"489":{"varMapping":{"__isSmartRef__":true,"id":490},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":491},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"490":{"this":{"__isSmartRef__":true,"id":432}},"491":{},"492":{"varMapping":{"__isSmartRef__":true,"id":493},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":494},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"493":{"this":{"__isSmartRef__":true,"id":432}},"494":{},"495":{"varMapping":{"__isSmartRef__":true,"id":496},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":497},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"496":{"this":{"__isSmartRef__":true,"id":432}},"497":{},"498":{"submorphs":[{"__isSmartRef__":true,"id":499}],"scripts":[],"shape":{"__isSmartRef__":true,"id":534},"eventHandler":{"__isSmartRef__":true,"id":535},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"208542A7-BABF-4CF6-BE35-ECAEB8833A52","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":5.969026041820607,"name":"slice7","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":25,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":536},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"499":{"submorphs":[{"__isSmartRef__":true,"id":500}],"scripts":[],"shape":{"__isSmartRef__":true,"id":532},"eventHandler":{"__isSmartRef__":true,"id":533},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"12A6BB01-18A0-477D-A9EA-91B8C90237F3","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":498},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":433}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":16,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"500":{"submorphs":[],"scripts":[],"id":"B8DDCA8B-114E-449F-B079-A1CEE27A91B3","shape":{"__isSmartRef__":true,"id":501},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":502},"eventHandler":{"__isSmartRef__":true,"id":526},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":527},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":499},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":434}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":7,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"501":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"502":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":503},{"__isSmartRef__":true,"id":505},{"__isSmartRef__":true,"id":507},{"__isSmartRef__":true,"id":509},{"__isSmartRef__":true,"id":511},{"__isSmartRef__":true,"id":513},{"__isSmartRef__":true,"id":515},{"__isSmartRef__":true,"id":517},{"__isSmartRef__":true,"id":519},{"__isSmartRef__":true,"id":521},{"__isSmartRef__":true,"id":523}],"lastModifiedDate":{"__isSmartRef__":true,"id":525},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"503":{"date":{"__isSmartRef__":true,"id":504},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"504":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"505":{"date":{"__isSmartRef__":true,"id":506},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"506":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"507":{"date":{"__isSmartRef__":true,"id":508},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"508":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"509":{"date":{"__isSmartRef__":true,"id":510},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"510":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"511":{"date":{"__isSmartRef__":true,"id":512},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"512":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"513":{"date":{"__isSmartRef__":true,"id":514},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"514":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"515":{"date":{"__isSmartRef__":true,"id":516},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"516":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"517":{"date":{"__isSmartRef__":true,"id":518},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"518":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"519":{"date":{"__isSmartRef__":true,"id":520},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"520":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"521":{"date":{"__isSmartRef__":true,"id":522},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"522":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"523":{"date":{"__isSmartRef__":true,"id":524},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"524":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"525":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"526":{"morph":{"__isSmartRef__":true,"id":500},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"527":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":528}},"528":{"test01IsMorph":{"__isSmartRef__":true,"id":529}},"529":{"varMapping":{"__isSmartRef__":true,"id":530},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":531},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"530":{"this":{"__isSmartRef__":true,"id":527}},"531":{},"532":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"533":{"morph":{"__isSmartRef__":true,"id":499},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"534":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"535":{"morph":{"__isSmartRef__":true,"id":498},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"536":{"innerMorph":{"__isSmartRef__":true,"id":537},"beCommanderMorph":{"__isSmartRef__":true,"id":540},"copyTraitTo":{"__isSmartRef__":true,"id":543},"makeNewClone":{"__isSmartRef__":true,"id":546},"prepareToCommand":{"__isSmartRef__":true,"id":549},"removeCloneReferences":{"__isSmartRef__":true,"id":552},"unwrapForClones":{"__isSmartRef__":true,"id":555},"wrapForClones":{"__isSmartRef__":true,"id":558},"wrapAddMorph":{"__isSmartRef__":true,"id":561}},"537":{"varMapping":{"__isSmartRef__":true,"id":538},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":539},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"538":{"this":{"__isSmartRef__":true,"id":498}},"539":{},"540":{"varMapping":{"__isSmartRef__":true,"id":541},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":542},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"541":{"this":{"__isSmartRef__":true,"id":498}},"542":{},"543":{"varMapping":{"__isSmartRef__":true,"id":544},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":545},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"544":{"this":{"__isSmartRef__":true,"id":498}},"545":{},"546":{"varMapping":{"__isSmartRef__":true,"id":547},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":548},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"547":{"this":{"__isSmartRef__":true,"id":498}},"548":{},"549":{"varMapping":{"__isSmartRef__":true,"id":550},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":551},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"550":{"this":{"__isSmartRef__":true,"id":498}},"551":{},"552":{"varMapping":{"__isSmartRef__":true,"id":553},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":554},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"553":{"this":{"__isSmartRef__":true,"id":498}},"554":{},"555":{"varMapping":{"__isSmartRef__":true,"id":556},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":557},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"556":{"this":{"__isSmartRef__":true,"id":498}},"557":{},"558":{"varMapping":{"__isSmartRef__":true,"id":559},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":560},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"559":{"this":{"__isSmartRef__":true,"id":498}},"560":{},"561":{"varMapping":{"__isSmartRef__":true,"id":562},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":563},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"562":{"this":{"__isSmartRef__":true,"id":498}},"563":{},"564":{"submorphs":[{"__isSmartRef__":true,"id":565}],"scripts":[],"shape":{"__isSmartRef__":true,"id":600},"eventHandler":{"__isSmartRef__":true,"id":601},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"CD729797-7A66-4D02-B94C-CE830CA19604","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":4.084070449666731,"name":"slice8","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432},{"__isSmartRef__":true,"id":498}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","_Scale"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":26,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":602},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","_Scale":"lively.pt(-1.0,1.0)"},"565":{"submorphs":[{"__isSmartRef__":true,"id":566}],"scripts":[],"shape":{"__isSmartRef__":true,"id":598},"eventHandler":{"__isSmartRef__":true,"id":599},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"AF7C09C7-E24B-490C-9F87-99FD3F48E47A","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":564},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":433},{"__isSmartRef__":true,"id":499}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":17,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"566":{"submorphs":[],"scripts":[],"id":"38FA56E3-48D5-4844-BAD5-DB1D6BE81579","shape":{"__isSmartRef__":true,"id":567},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":568},"eventHandler":{"__isSmartRef__":true,"id":592},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":593},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":565},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":434},{"__isSmartRef__":true,"id":500}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":8,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"567":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"568":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":569},{"__isSmartRef__":true,"id":571},{"__isSmartRef__":true,"id":573},{"__isSmartRef__":true,"id":575},{"__isSmartRef__":true,"id":577},{"__isSmartRef__":true,"id":579},{"__isSmartRef__":true,"id":581},{"__isSmartRef__":true,"id":583},{"__isSmartRef__":true,"id":585},{"__isSmartRef__":true,"id":587},{"__isSmartRef__":true,"id":589}],"lastModifiedDate":{"__isSmartRef__":true,"id":591},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"569":{"date":{"__isSmartRef__":true,"id":570},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"570":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"571":{"date":{"__isSmartRef__":true,"id":572},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"572":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"573":{"date":{"__isSmartRef__":true,"id":574},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"574":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"575":{"date":{"__isSmartRef__":true,"id":576},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"576":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"577":{"date":{"__isSmartRef__":true,"id":578},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"578":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"579":{"date":{"__isSmartRef__":true,"id":580},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"580":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"581":{"date":{"__isSmartRef__":true,"id":582},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"582":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"583":{"date":{"__isSmartRef__":true,"id":584},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"584":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"585":{"date":{"__isSmartRef__":true,"id":586},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"586":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"587":{"date":{"__isSmartRef__":true,"id":588},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"588":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"589":{"date":{"__isSmartRef__":true,"id":590},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"590":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"591":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"592":{"morph":{"__isSmartRef__":true,"id":566},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"593":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":594}},"594":{"test01IsMorph":{"__isSmartRef__":true,"id":595}},"595":{"varMapping":{"__isSmartRef__":true,"id":596},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":597},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"596":{"this":{"__isSmartRef__":true,"id":593}},"597":{},"598":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"599":{"morph":{"__isSmartRef__":true,"id":565},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"600":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"601":{"morph":{"__isSmartRef__":true,"id":564},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"602":{"innerMorph":{"__isSmartRef__":true,"id":603},"beCommanderMorph":{"__isSmartRef__":true,"id":606},"copyTraitTo":{"__isSmartRef__":true,"id":609},"makeNewClone":{"__isSmartRef__":true,"id":612},"prepareToCommand":{"__isSmartRef__":true,"id":615},"removeCloneReferences":{"__isSmartRef__":true,"id":618},"unwrapForClones":{"__isSmartRef__":true,"id":621},"wrapForClones":{"__isSmartRef__":true,"id":624},"wrapAddMorph":{"__isSmartRef__":true,"id":627}},"603":{"varMapping":{"__isSmartRef__":true,"id":604},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":605},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"604":{"this":{"__isSmartRef__":true,"id":564}},"605":{},"606":{"varMapping":{"__isSmartRef__":true,"id":607},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":608},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"607":{"this":{"__isSmartRef__":true,"id":564}},"608":{},"609":{"varMapping":{"__isSmartRef__":true,"id":610},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":611},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"610":{"this":{"__isSmartRef__":true,"id":564}},"611":{},"612":{"varMapping":{"__isSmartRef__":true,"id":613},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":614},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"613":{"this":{"__isSmartRef__":true,"id":564}},"614":{},"615":{"varMapping":{"__isSmartRef__":true,"id":616},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":617},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"616":{"this":{"__isSmartRef__":true,"id":564}},"617":{},"618":{"varMapping":{"__isSmartRef__":true,"id":619},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":620},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"619":{"this":{"__isSmartRef__":true,"id":564}},"620":{},"621":{"varMapping":{"__isSmartRef__":true,"id":622},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":623},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"622":{"this":{"__isSmartRef__":true,"id":564}},"623":{},"624":{"varMapping":{"__isSmartRef__":true,"id":625},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":626},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"625":{"this":{"__isSmartRef__":true,"id":564}},"626":{},"627":{"varMapping":{"__isSmartRef__":true,"id":628},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":629},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"628":{"this":{"__isSmartRef__":true,"id":564}},"629":{},"630":{"submorphs":[{"__isSmartRef__":true,"id":631}],"scripts":[],"shape":{"__isSmartRef__":true,"id":666},"eventHandler":{"__isSmartRef__":true,"id":667},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"E472C87A-1A0C-4DDF-AD37-FC44A80BECF0","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":7.225663103256524,"name":"slice9","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432},{"__isSmartRef__":true,"id":498},{"__isSmartRef__":true,"id":564}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"owner":{"__isSmartRef__":true,"id":167},"isCopyMorphRef":true,"morphRefId":27,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":668},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"631":{"submorphs":[{"__isSmartRef__":true,"id":632}],"scripts":[],"shape":{"__isSmartRef__":true,"id":664},"eventHandler":{"__isSmartRef__":true,"id":665},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"C693E7C4-9AD7-4796-9EA1-06FE6AEBAAC8","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":630},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":433},{"__isSmartRef__":true,"id":499},{"__isSmartRef__":true,"id":565}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"isCopyMorphRef":true,"morphRefId":18,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"632":{"submorphs":[],"scripts":[],"id":"EE10E54E-F395-4BFC-990F-220DA04D43E0","shape":{"__isSmartRef__":true,"id":633},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":634},"eventHandler":{"__isSmartRef__":true,"id":658},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":659},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":631},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":434},{"__isSmartRef__":true,"id":500},{"__isSmartRef__":true,"id":566}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"isCopyMorphRef":true,"morphRefId":9,"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"633":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"634":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":635},{"__isSmartRef__":true,"id":637},{"__isSmartRef__":true,"id":639},{"__isSmartRef__":true,"id":641},{"__isSmartRef__":true,"id":643},{"__isSmartRef__":true,"id":645},{"__isSmartRef__":true,"id":647},{"__isSmartRef__":true,"id":649},{"__isSmartRef__":true,"id":651},{"__isSmartRef__":true,"id":653},{"__isSmartRef__":true,"id":655}],"lastModifiedDate":{"__isSmartRef__":true,"id":657},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"635":{"date":{"__isSmartRef__":true,"id":636},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"636":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"637":{"date":{"__isSmartRef__":true,"id":638},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"638":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"639":{"date":{"__isSmartRef__":true,"id":640},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"640":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"641":{"date":{"__isSmartRef__":true,"id":642},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"642":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"643":{"date":{"__isSmartRef__":true,"id":644},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"644":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"645":{"date":{"__isSmartRef__":true,"id":646},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"646":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"647":{"date":{"__isSmartRef__":true,"id":648},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"648":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"649":{"date":{"__isSmartRef__":true,"id":650},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"650":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"651":{"date":{"__isSmartRef__":true,"id":652},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"652":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"653":{"date":{"__isSmartRef__":true,"id":654},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"654":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"655":{"date":{"__isSmartRef__":true,"id":656},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"656":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"657":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"658":{"morph":{"__isSmartRef__":true,"id":632},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"659":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":660}},"660":{"test01IsMorph":{"__isSmartRef__":true,"id":661}},"661":{"varMapping":{"__isSmartRef__":true,"id":662},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":663},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"662":{"this":{"__isSmartRef__":true,"id":659}},"663":{},"664":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"665":{"morph":{"__isSmartRef__":true,"id":631},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"666":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"667":{"morph":{"__isSmartRef__":true,"id":630},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"668":{"innerMorph":{"__isSmartRef__":true,"id":669},"beCommanderMorph":{"__isSmartRef__":true,"id":672},"copyTraitTo":{"__isSmartRef__":true,"id":675},"makeNewClone":{"__isSmartRef__":true,"id":678},"prepareToCommand":{"__isSmartRef__":true,"id":681},"removeCloneReferences":{"__isSmartRef__":true,"id":684},"unwrapForClones":{"__isSmartRef__":true,"id":687},"wrapForClones":{"__isSmartRef__":true,"id":690},"wrapAddMorph":{"__isSmartRef__":true,"id":693}},"669":{"varMapping":{"__isSmartRef__":true,"id":670},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":671},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"670":{"this":{"__isSmartRef__":true,"id":630}},"671":{},"672":{"varMapping":{"__isSmartRef__":true,"id":673},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":674},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"673":{"this":{"__isSmartRef__":true,"id":630}},"674":{},"675":{"varMapping":{"__isSmartRef__":true,"id":676},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":677},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"676":{"this":{"__isSmartRef__":true,"id":630}},"677":{},"678":{"varMapping":{"__isSmartRef__":true,"id":679},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":680},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"679":{"this":{"__isSmartRef__":true,"id":630}},"680":{},"681":{"varMapping":{"__isSmartRef__":true,"id":682},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":683},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"682":{"this":{"__isSmartRef__":true,"id":630}},"683":{},"684":{"varMapping":{"__isSmartRef__":true,"id":685},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":686},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"685":{"this":{"__isSmartRef__":true,"id":630}},"686":{},"687":{"varMapping":{"__isSmartRef__":true,"id":688},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":689},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"688":{"this":{"__isSmartRef__":true,"id":630}},"689":{},"690":{"varMapping":{"__isSmartRef__":true,"id":691},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":692},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"691":{"this":{"__isSmartRef__":true,"id":630}},"692":{},"693":{"varMapping":{"__isSmartRef__":true,"id":694},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":695},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"694":{"this":{"__isSmartRef__":true,"id":630}},"695":{},"696":{"submorphs":[{"__isSmartRef__":true,"id":697}],"scripts":[],"shape":{"__isSmartRef__":true,"id":732},"eventHandler":{"__isSmartRef__":true,"id":733},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455"],"id":"62E011E1-60F3-4EA2-A5C1-2E64CC7769D2","droppingEnabled":true,"halosEnabled":true,"eventsAreIgnored":true,"_Rotation":5.340707511102648,"name":"slice10","commandedClones":[{"__isSmartRef__":true,"id":164},{"__isSmartRef__":true,"id":168},{"__isSmartRef__":true,"id":234},{"__isSmartRef__":true,"id":300},{"__isSmartRef__":true,"id":366},{"__isSmartRef__":true,"id":432},{"__isSmartRef__":true,"id":498},{"__isSmartRef__":true,"id":564},{"__isSmartRef__":true,"id":630}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position","_Scale"],"owner":{"__isSmartRef__":true,"id":167},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":734},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","_Scale":"lively.pt(-1.0,1.0)"},"697":{"submorphs":[{"__isSmartRef__":true,"id":698}],"scripts":[],"shape":{"__isSmartRef__":true,"id":730},"eventHandler":{"__isSmartRef__":true,"id":731},"_ClipMode":"hidden","derivationIds":["7B66074A-9F31-4E1B-9E51-F28D233E5455","7331735F-8D0D-4947-B652-32B5670B319C"],"id":"B342CCF7-CFFB-459B-BC7A-29EB91958D88","droppingEnabled":true,"halosEnabled":true,"name":"Box1","owner":{"__isSmartRef__":true,"id":696},"_Rotation":-0.9424777960769379,"commandedClones":[{"__isSmartRef__":true,"id":161},{"__isSmartRef__":true,"id":169},{"__isSmartRef__":true,"id":235},{"__isSmartRef__":true,"id":301},{"__isSmartRef__":true,"id":367},{"__isSmartRef__":true,"id":433},{"__isSmartRef__":true,"id":499},{"__isSmartRef__":true,"id":565},{"__isSmartRef__":true,"id":631}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"698":{"submorphs":[],"scripts":[],"id":"DA35162B-7C41-4654-A4E8-111228ED1B18","shape":{"__isSmartRef__":true,"id":699},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"Rectangle","partsBinMetaInfo":{"__isSmartRef__":true,"id":700},"eventHandler":{"__isSmartRef__":true,"id":724},"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","19D9252C-E261-4DAD-8766-214094927866","852AB695-C2D1-41DF-BB84-328F72060F7E"],"partTests":{"__isSmartRef__":true,"id":725},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":697},"isBeingDragged":false,"commandedClones":[{"__isSmartRef__":true,"id":129},{"__isSmartRef__":true,"id":170},{"__isSmartRef__":true,"id":236},{"__isSmartRef__":true,"id":302},{"__isSmartRef__":true,"id":368},{"__isSmartRef__":true,"id":434},{"__isSmartRef__":true,"id":500},{"__isSmartRef__":true,"id":566},{"__isSmartRef__":true,"id":632}],"methodsWrappedForClones":["setFill","morphicSetter","remove","addMorph"],"_Rotation":0.7853981633974485,"_Scale":1,"__serializedExpressions__":["_Position","distanceToDragEvent"],"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(7.0,24.0)","distanceToDragEvent":"lively.pt(80.0,-11.0)"},"699":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(169.0,19.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(0,0,204)","_Padding":"lively.rect(0,0,0,0)"},"700":{"partsSpaceName":"PartsBin/Basic","comment":"A morph hierarchy visualization with bundle view simulation of attribute connections.","migrationLevel":4,"partName":"Rectangle","changes":[{"__isSmartRef__":true,"id":701},{"__isSmartRef__":true,"id":703},{"__isSmartRef__":true,"id":705},{"__isSmartRef__":true,"id":707},{"__isSmartRef__":true,"id":709},{"__isSmartRef__":true,"id":711},{"__isSmartRef__":true,"id":713},{"__isSmartRef__":true,"id":715},{"__isSmartRef__":true,"id":717},{"__isSmartRef__":true,"id":719},{"__isSmartRef__":true,"id":721}],"lastModifiedDate":{"__isSmartRef__":true,"id":723},"revisionOnLoad":190152,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"701":{"date":{"__isSmartRef__":true,"id":702},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"702":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"703":{"date":{"__isSmartRef__":true,"id":704},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"704":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"705":{"date":{"__isSmartRef__":true,"id":706},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"706":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"707":{"date":{"__isSmartRef__":true,"id":708},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"708":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"709":{"date":{"__isSmartRef__":true,"id":710},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"710":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"711":{"date":{"__isSmartRef__":true,"id":712},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"712":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"713":{"date":{"__isSmartRef__":true,"id":714},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"714":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"715":{"date":{"__isSmartRef__":true,"id":716},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"716":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"717":{"date":{"__isSmartRef__":true,"id":718},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"718":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"719":{"date":{"__isSmartRef__":true,"id":720},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"720":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"721":{"date":{"__isSmartRef__":true,"id":722},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"722":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"723":{"isSerializedDate":true,"string":"Wed Mar 06 2013 16:25:14 GMT-0800 (PST)"},"724":{"morph":{"__isSmartRef__":true,"id":698},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"725":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":726}},"726":{"test01IsMorph":{"__isSmartRef__":true,"id":727}},"727":{"varMapping":{"__isSmartRef__":true,"id":728},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":729},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"728":{"this":{"__isSmartRef__":true,"id":725}},"729":{},"730":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"731":{"morph":{"__isSmartRef__":true,"id":697},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"732":{"_BorderWidth":0,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"733":{"morph":{"__isSmartRef__":true,"id":696},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"734":{"innerMorph":{"__isSmartRef__":true,"id":735},"beCommanderMorph":{"__isSmartRef__":true,"id":738},"copyTraitTo":{"__isSmartRef__":true,"id":741},"makeNewClone":{"__isSmartRef__":true,"id":744},"prepareToCommand":{"__isSmartRef__":true,"id":747},"removeCloneReferences":{"__isSmartRef__":true,"id":750},"unwrapForClones":{"__isSmartRef__":true,"id":753},"wrapForClones":{"__isSmartRef__":true,"id":756},"wrapAddMorph":{"__isSmartRef__":true,"id":759}},"735":{"varMapping":{"__isSmartRef__":true,"id":736},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":737},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"736":{"this":{"__isSmartRef__":true,"id":696}},"737":{},"738":{"varMapping":{"__isSmartRef__":true,"id":739},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":740},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"739":{"this":{"__isSmartRef__":true,"id":696}},"740":{},"741":{"varMapping":{"__isSmartRef__":true,"id":742},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":743},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"742":{"this":{"__isSmartRef__":true,"id":696}},"743":{},"744":{"varMapping":{"__isSmartRef__":true,"id":745},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":746},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"745":{"this":{"__isSmartRef__":true,"id":696}},"746":{},"747":{"varMapping":{"__isSmartRef__":true,"id":748},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":749},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"748":{"this":{"__isSmartRef__":true,"id":696}},"749":{},"750":{"varMapping":{"__isSmartRef__":true,"id":751},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":752},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"751":{"this":{"__isSmartRef__":true,"id":696}},"752":{},"753":{"varMapping":{"__isSmartRef__":true,"id":754},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":755},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"754":{"this":{"__isSmartRef__":true,"id":696}},"755":{},"756":{"varMapping":{"__isSmartRef__":true,"id":757},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":758},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"757":{"this":{"__isSmartRef__":true,"id":696}},"758":{},"759":{"varMapping":{"__isSmartRef__":true,"id":760},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":761},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"760":{"this":{"__isSmartRef__":true,"id":696}},"761":{},"762":{"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor","_Fill"],"_BorderWidth":0,"__LivelyClassName__":"lively.morphic.Shapes.Ellipse","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(-400.0,-400.0)","_Extent":"lively.pt(800.0,800.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(127,230,127)"},"763":{"morph":{"__isSmartRef__":true,"id":167},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"764":{"innerMorph":{"__isSmartRef__":true,"id":765},"beCommanderMorph":{"__isSmartRef__":true,"id":768},"copyTraitTo":{"__isSmartRef__":true,"id":771},"makeNewClone":{"__isSmartRef__":true,"id":774},"prepareToCommand":{"__isSmartRef__":true,"id":777},"removeCloneReferences":{"__isSmartRef__":true,"id":780},"unwrapForClones":{"__isSmartRef__":true,"id":783},"wrapForClones":{"__isSmartRef__":true,"id":786},"wrapAddMorph":{"__isSmartRef__":true,"id":789}},"765":{"varMapping":{"__isSmartRef__":true,"id":766},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":767},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"766":{"this":{"__isSmartRef__":true,"id":164}},"767":{},"768":{"varMapping":{"__isSmartRef__":true,"id":769},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":770},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"769":{"this":{"__isSmartRef__":true,"id":164}},"770":{},"771":{"varMapping":{"__isSmartRef__":true,"id":772},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":773},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"772":{"this":{"__isSmartRef__":true,"id":164}},"773":{},"774":{"varMapping":{"__isSmartRef__":true,"id":775},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":776},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"775":{"this":{"__isSmartRef__":true,"id":164}},"776":{},"777":{"varMapping":{"__isSmartRef__":true,"id":778},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":779},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"778":{"this":{"__isSmartRef__":true,"id":164}},"779":{},"780":{"varMapping":{"__isSmartRef__":true,"id":781},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":782},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"781":{"this":{"__isSmartRef__":true,"id":164}},"782":{},"783":{"varMapping":{"__isSmartRef__":true,"id":784},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":785},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"784":{"this":{"__isSmartRef__":true,"id":164}},"785":{},"786":{"varMapping":{"__isSmartRef__":true,"id":787},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":788},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"787":{"this":{"__isSmartRef__":true,"id":164}},"788":{},"789":{"varMapping":{"__isSmartRef__":true,"id":790},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":791},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"790":{"this":{"__isSmartRef__":true,"id":164}},"791":{},"792":{"_BorderWidth":0,"__serializedExpressions__":["_Fill","_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Fill":"Color.rgb(223,223,249)","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"793":{"morph":{"__isSmartRef__":true,"id":96},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"794":{"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"_BorderWidth":0,"_Fill":null,"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(400.0,400.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"795":{"morph":{"__isSmartRef__":true,"id":95},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"796":{"innerMorph":{"__isSmartRef__":true,"id":797},"beCommanderMorph":{"__isSmartRef__":true,"id":800},"copyTraitTo":{"__isSmartRef__":true,"id":803},"makeNewClone":{"__isSmartRef__":true,"id":806},"prepareToCommand":{"__isSmartRef__":true,"id":809},"removeCloneReferences":{"__isSmartRef__":true,"id":812},"unwrapForClones":{"__isSmartRef__":true,"id":815},"wrapForClones":{"__isSmartRef__":true,"id":818},"wrapAddMorph":{"__isSmartRef__":true,"id":821}},"797":{"varMapping":{"__isSmartRef__":true,"id":798},"source":"function innerMorph() {return this.submorphs[0]}","funcProperties":{"__isSmartRef__":true,"id":799},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"798":{"this":{"__isSmartRef__":true,"id":95}},"799":{},"800":{"varMapping":{"__isSmartRef__":true,"id":801},"source":"function beCommanderMorph() {\n    // Each node in this morphic structure must have its methods\n    // wrapped to delegate them on to all the clones\n    // It should be possible to run this method repeatedly as,\n    // for instance, to change the set of methods to wrap and delegate\n    this.withAllSubmorphsDo(function(ea) {\n        this.prepareToCommand.call(ea, this) }.bind(this)); \n}","funcProperties":{"__isSmartRef__":true,"id":802},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"801":{"this":{"__isSmartRef__":true,"id":95}},"802":{},"803":{"varMapping":{"__isSmartRef__":true,"id":804},"source":"function copyTraitTo(morph) {\n    var self = this;\n    ['beCommanderMorph', 'copyTraitTo', 'makeNewClone', 'prepareToCommand', 'removeCloneReferences', 'unwrapForClones', 'wrapForClones', 'wrapAddMorph'].forEach(function(method) {\n        morph.addScript(self[method]);\n    });\n}","funcProperties":{"__isSmartRef__":true,"id":805},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"804":{"this":{"__isSmartRef__":true,"id":95}},"805":{},"806":{"varMapping":{"__isSmartRef__":true,"id":807},"source":"function makeNewClone() {\n    // Add a new clone to the array of clones and return it\n    var newClone = this.copy();\n\n    // Every node (morph) in the clone must be added to the\n    // list of clones for the corresponding node in the commander\n    var flatCommander = [];\n    this.withAllSubmorphsDo(function (ea) {\n        flatCommander.push(ea)});\n    var flatClone = [];\n    newClone.withAllSubmorphsDo(function (ea) {\n        ea.stopStepping();  // clone nodes don't tick\n        flatClone.push(ea)});\n    for (var i=0; i<flatCommander.length; i++) {\n        flatCommander[i].commandedClones.push(flatClone[i]) }\n\n    return newClone\n}","funcProperties":{"__isSmartRef__":true,"id":808},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"807":{"this":{"__isSmartRef__":true,"id":95}},"808":{},"809":{"varMapping":{"__isSmartRef__":true,"id":810},"source":"function prepareToCommand(commander) {\n    // Install an array of the clones of this morph\n    if (this.commandedClones == null) this.commandedClones = [];\n    \n    // Unwrap any methods previously wrapped\n    (this.methodsWrappedForClones || []).forEach(function(ea) {\n        commander.unwrapForClones.call(this, ea);\n        }.bind(this));\n    this.methodsWrappedForClones = [];\n    // Then wrap this new set of methods to be passed on to all clones\n    [\"setFill\", \"morphicSetter\", \"remove\"].forEach(function (ea) {\n        commander.wrapForClones.call(this, ea);\n        this.methodsWrappedForClones.push(ea);\n        }.bind(this));\n    commander.wrapAddMorph.call(this, commander);\n    this.methodsWrappedForClones.push(\"addMorph\");\n}","funcProperties":{"__isSmartRef__":true,"id":811},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"810":{"this":{"__isSmartRef__":true,"id":95}},"811":{},"812":{"varMapping":{"__isSmartRef__":true,"id":813},"source":"function removeCloneReferences() {  // this.removeAllClones()\n   this.withAllSubmorphsDo(function (ea) {\n        if (ea.commandedClones) ea.commandedClones = [];\n        })\n}","funcProperties":{"__isSmartRef__":true,"id":814},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"813":{"this":{"__isSmartRef__":true,"id":95}},"814":{},"815":{"varMapping":{"__isSmartRef__":true,"id":816},"source":"function unwrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return\n    if (method.isWrapped) this[methodName] = method.originalFunction;\n}","funcProperties":{"__isSmartRef__":true,"id":817},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"816":{"this":{"__isSmartRef__":true,"id":95}},"817":{},"818":{"varMapping":{"__isSmartRef__":true,"id":819},"source":"function wrapForClones(methodName) {\n    var method = this[methodName];\n    if (!method) return console.log(\"method \" + methodName + \"could not be found in -wrapFor-\");\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        this.commandedClones.forEach(function (ea) {\n            ea[methodName].apply(ea, incomingArgs) });\n        if(methodName == \"remove\") {  // ugh\n            this.withAllSubmorphsDo(function(ea) {\n                ea.commandedClones = new Array(0); })\n           };\n        originalMethod.apply(this, incomingArgs);\n        });\n}","funcProperties":{"__isSmartRef__":true,"id":820},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"819":{"this":{"__isSmartRef__":true,"id":95}},"820":{},"821":{"varMapping":{"__isSmartRef__":true,"id":822},"source":"function wrapAddMorph(commander) {\n    var methodName = \"addMorph\";\n    var method = this[methodName];\n    this[methodName] = method.wrap(function(originalMethod) {\n        var incomingArgs = Array.from(arguments).slice(1);\n        var morphToAdd = incomingArgs[0];\n        commander.copyTraitTo(morphToAdd);\n        commander.beCommanderMorph.call(morphToAdd);\n        // needs to come first, else will run remove\n        originalMethod.apply(this, incomingArgs);  // this.addMorph\n        this.commandedClones.forEach(function (ea) {\n            var argsForClone = [morphToAdd.makeNewClone()];\n            if (incomingArgs.length > 1) {\n                // for now we don't handle arg2 positioning\n                // would use # of this clone\n                // and then use clone of arg2 with that index\n                }\n            return ea[methodName].apply(ea, argsForClone);  // clone.addMorph\n            });\n        return morphToAdd});\n}","funcProperties":{"__isSmartRef__":true,"id":823},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"822":{"this":{"__isSmartRef__":true,"id":95}},"823":{},"824":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_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(400.0,450.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(191,191,243)","_Padding":"lively.rect(0,0,0,0)"},"825":{"partsSpaceName":"PartsBin/Demos/","comment":"A new kaleidoscope maker that relays state changes instead of making copies at every change. Triangular clipping in HTML, woo hoo ;-)\n\nSet it down on the right side of your screen.  Drop things in the slice (clock and windmill work nicely), drag them, rotate them.\n\nSet symmetry for different number of segments","migrationLevel":4,"partName":"KaleidoscopeMaker","changes":[{"__isSmartRef__":true,"id":826},{"__isSmartRef__":true,"id":828},{"__isSmartRef__":true,"id":830},{"__isSmartRef__":true,"id":832},{"__isSmartRef__":true,"id":834},{"__isSmartRef__":true,"id":836},{"__isSmartRef__":true,"id":838},{"__isSmartRef__":true,"id":840},{"__isSmartRef__":true,"id":842},{"__isSmartRef__":true,"id":844},{"__isSmartRef__":true,"id":846},{"__isSmartRef__":true,"id":848},{"__isSmartRef__":true,"id":850}],"lastModifiedDate":{"__isSmartRef__":true,"id":852},"revisionOnLoad":195093,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"826":{"date":{"__isSmartRef__":true,"id":827},"author":"Dan","message":"no comment","id":"D448A708-C416-47A4-9246-64E216D0C483"},"827":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:19:10 GMT-0700 (PDT)"},"828":{"date":{"__isSmartRef__":true,"id":829},"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8"},"829":{"isSerializedDate":true,"string":"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)"},"830":{"date":{"__isSmartRef__":true,"id":831},"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23"},"831":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:36 GMT-0700 (PDT)"},"832":{"date":{"__isSmartRef__":true,"id":833},"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC"},"833":{"isSerializedDate":true,"string":"Thu May 03 2012 06:51:30 GMT-0700 (PDT)"},"834":{"date":{"__isSmartRef__":true,"id":835},"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2"},"835":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)"},"836":{"date":{"__isSmartRef__":true,"id":837},"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B"},"837":{"isSerializedDate":true,"string":"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)"},"838":{"date":{"__isSmartRef__":true,"id":839},"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7"},"839":{"isSerializedDate":true,"string":"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)"},"840":{"date":{"__isSmartRef__":true,"id":841},"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350"},"841":{"isSerializedDate":true,"string":"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)"},"842":{"date":{"__isSmartRef__":true,"id":843},"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8"},"843":{"isSerializedDate":true,"string":"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)"},"844":{"date":{"__isSmartRef__":true,"id":845},"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205"},"845":{"isSerializedDate":true,"string":"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)"},"846":{"date":{"__isSmartRef__":true,"id":847},"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2"},"847":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)"},"848":{"date":{"__isSmartRef__":true,"id":849},"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20"},"849":{"isSerializedDate":true,"string":"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)"},"850":{"date":{"__isSmartRef__":true,"id":851},"author":"Dan","message":"no comment","id":"0C739594-6711-4293-B0EB-1592E804B4D3"},"851":{"isSerializedDate":true,"string":"Sat Apr 13 2013 14:05:57 GMT-0700 (PDT)"},"852":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:16:16 GMT-0700 (PDT)"},"853":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"854":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":855}},"855":{"test01IsMorph":{"__isSmartRef__":true,"id":856}},"856":{"varMapping":{"__isSmartRef__":true,"id":857},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":858},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"857":{"this":{"__isSmartRef__":true,"id":854}},"858":{},"859":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":860},"eventHandler":{"__isSmartRef__":true,"id":865},"_ClipMode":"visible","derivationIds":[],"id":"33C882C1-47BF-4F13-AC9F-4E4CFBBA0342","droppingEnabled":true,"halosEnabled":true,"owner":null,"eventsAreIgnored":true,"showsHalos":false,"controlPoints":[{"__isSmartRef__":true,"id":866},{"__isSmartRef__":true,"id":867},{"__isSmartRef__":true,"id":868},{"__isSmartRef__":true,"id":869}],"prevScroll":[0,0],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Path","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs","_Position":"lively.pt(0.0,0.0)"},"860":{"dontChangeShape":false,"cachedVertices":null,"_PathElements":[{"__isSmartRef__":true,"id":861},{"__isSmartRef__":true,"id":862},{"__isSmartRef__":true,"id":863},{"__isSmartRef__":true,"id":864}],"_BorderWidth":1,"_Fill":null,"__serializedExpressions__":["_Position","_Extent","_Padding","_BorderColor"],"__LivelyClassName__":"lively.morphic.Shapes.Path","__SourceModuleName__":"Global.lively.morphic.PathShapes","_Position":"lively.pt(-1.0,-1.0)","_Extent":"lively.pt(177.3,301.0)","_Padding":"lively.rect(0,0,0,0)","_BorderColor":"Color.rgb(0,0,0)"},"861":{"isAbsolute":true,"x":0,"y":0,"__LivelyClassName__":"lively.morphic.Shapes.MoveTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"862":{"isAbsolute":true,"x":176.33557568774197,"y":242.7050983124842,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"863":{"isAbsolute":true,"x":92.70509831248424,"y":285.31695488854604,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"864":{"isAbsolute":true,"x":1.8369701987210297e-14,"y":300,"__LivelyClassName__":"lively.morphic.Shapes.LineTo","__SourceModuleName__":"Global.lively.morphic.PathShapes"},"865":{"morph":{"__isSmartRef__":true,"id":859},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"866":{"morph":{"__isSmartRef__":true,"id":859},"index":0,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"867":{"morph":{"__isSmartRef__":true,"id":859},"index":1,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"868":{"morph":{"__isSmartRef__":true,"id":859},"index":2,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"869":{"morph":{"__isSmartRef__":true,"id":859},"index":3,"__LivelyClassName__":"lively.morphic.ControlPoint","__SourceModuleName__":"Global.lively.morphic.AdditionalMorphs"},"870":{"reset":{"__isSmartRef__":true,"id":871},"setNFold":{"__isSmartRef__":true,"id":875},"updateDisplayMorph":{"__isSmartRef__":true,"id":879},"makeSlice":{"__isSmartRef__":true,"id":883},"aboutMe":{"__isSmartRef__":true,"id":887},"yetToDo":{"__isSmartRef__":true,"id":891},"onLoad":{"__isSmartRef__":true,"id":895},"setSymmetry":{"__isSmartRef__":true,"id":899}},"871":{"varMapping":{"__isSmartRef__":true,"id":872},"source":"function reset(r) { // this.reset(400)\n    this.setFill(Color.blue.lighter().lighter());\n    if (this.displayMorph) this.displayMorph.remove();\n    if (r) this.radius = r;\n    this.setExtent(pt(r, r+50));\n    this.setNFold(5);\n    this.setPosition(pt(r, r));\n/*\n    // Add a button for restart\n    this.symmetryButton.remove();\n    var b = new lively.morphic.Button (new Rectangle(0, 0, 100, 20), 'set symmetry');\n    this.addMorph(b);\n    b.addScript(function onMouseUp(evt) {this.owner.setSymmetry(evt)});\n    b.align(b.bounds().bottomRight(), this.innerBounds().bottomRight().addXY(-50, -15));\n    this.symmetryButton = b;\n    */\n}","funcProperties":{"__isSmartRef__":true,"id":873},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"872":{"this":{"__isSmartRef__":true,"id":0}},"873":{"timestamp":{"__isSmartRef__":true,"id":874},"user":"Dan","tags":[]},"874":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:03:29 GMT-0700 (PDT)"},"875":{"varMapping":{"__isSmartRef__":true,"id":876},"source":"function setNFold(n) {  // this.setNFold(5)\n    this.nFold = n;\n    this.updateDisplayMorph();\n    }","funcProperties":{"__isSmartRef__":true,"id":877},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"876":{"this":{"__isSmartRef__":true,"id":0}},"877":{"timestamp":{"__isSmartRef__":true,"id":878},"user":"Dan","tags":[]},"878":{"isSerializedDate":true,"string":"Mon Mar 25 2013 23:39:34 GMT-0700 (PDT)"},"879":{"varMapping":{"__isSmartRef__":true,"id":880},"source":"function updateDisplayMorph() { // this.updateDisplayMorph()\n    var r = this.radius;\n    var theta = Math.PI / this.nFold;\n\n    // Build a new kaleidoscope disk at start or after removal\n    if (!this.displayMorph || !this.displayMorph.owner) {\n        this.displayMorph = lively.morphic.Morph.makeCircle(pt(r+10, r+10), r, 0, Color.black);\n        this.displayMorph.ignoreEvents();\n        this.displayMorph.setFill(Color.green.lighter());\n        this.world().addMorph(this.displayMorph);\n    }\n    this.displayMorph.removeAllMorphs();\n\n    // Make a new slice and copy morphs from the master into it\n    var newMaster = this.addMorph(this.makeSlice());\n    if (this.master) {\n        if (this.master.removeCloneReferences) this.master.removeCloneReferences();\n        this.master.innerMorph().submorphs.forEach( function(morph) {\n            var p = morph.getPosition();\n            var m = newMaster.innerMorph().addMorph(morph);\n            m.setPosition(p)});\n        this.master.remove(); }\n    this.master = this.addMorph(newMaster);\n    this.get('CommanderTrait').copyTraitTo(newMaster);\n    this.master.beCommanderMorph();  // newSlice becomes the new master\n\n    // Make normal and reflected slices as clones\n    if (this.nFold == 6) theta += 0.00001;  //workaround for dropped segment\n    for (var i=1; i<=this.nFold; i++) {\n        var slice1 = this.displayMorph.addMorph(this.master.makeNewClone());\n        var slice2 = this.displayMorph.addMorph(this.master.makeNewClone());\n        slice2.setScale(pt(-1, 1));\n        slice2.rotateBy(-Math.PI + 2*theta);\n        slice1.rotateBy(i*2*theta);\n        slice2.rotateBy(i*2*theta);\n        slice1.ignoreEvents();\n        slice2.ignoreEvents();\n    };\n\n    }","funcProperties":{"__isSmartRef__":true,"id":881},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"880":{"this":{"__isSmartRef__":true,"id":0}},"881":{"timestamp":{"__isSmartRef__":true,"id":882},"user":"Dan","tags":[]},"882":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:14:54 GMT-0700 (PDT)"},"883":{"varMapping":{"__isSmartRef__":true,"id":884},"source":"function makeSlice() {\n    // Make a clipping slice\n    var pi = Math.PI;\n    var r = this.radius;\n    var theta = pi / this.nFold;\n    // Two clipping rectangles rotated by theta make the slice\n    var slice = lively.morphic.Morph.makeRectangle(0, 0, r, r);\n    slice.setFill(null);  slice.setBorderWidth(0); slice.setClipMode(\"hidden\");\n    var innerRect = slice.copy();\n    slice.ignoreEvents();\n    innerRect.setFill(this.getFill().lighter());\n    slice.addMorph(innerRect);\n    slice.rotateBy((pi/2 - theta));\n    innerRect.rotateBy(-(pi/2 - theta));\n    slice.addScript(function innerMorph() {return this.submorphs[0]});\n    slice.setName(\"slice\");\n    return slice;\n    }","funcProperties":{"__isSmartRef__":true,"id":885},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"884":{"this":{"__isSmartRef__":true,"id":0}},"885":{"timestamp":{"__isSmartRef__":true,"id":886},"user":"Dan","tags":[]},"886":{"isSerializedDate":true,"string":"Sat Apr 13 2013 12:13:06 GMT-0700 (PDT)"},"887":{"varMapping":{"__isSmartRef__":true,"id":888},"source":"function aboutMe() {\n    // The base morph here is kind of a \"launch pad\"\n    // Any morphs dropped on it get copied into a pie-shaped clipping morph\n    // which is then rotated and replicated with reflections to make\n    // the kaleidoscopic image in the this.displayMorph;\n    \n    // This supplants an earlier implementation that copied morphs\n    // and that was discouragingly slow for many cases.\n    \n    // $morph('CommanderTrait').show()  // (very faint star)\n}","funcProperties":{"__isSmartRef__":true,"id":889},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"888":{"this":{"__isSmartRef__":true,"id":0}},"889":{"timestamp":{"__isSmartRef__":true,"id":890},"user":"Dan","tags":[]},"890":{"isSerializedDate":true,"string":"Sat Apr 13 2013 14:04:35 GMT-0700 (PDT)"},"891":{"varMapping":{"__isSmartRef__":true,"id":892},"source":"function yetToDo() {\n    // [ ] Get size from maker extent\n}","funcProperties":{"__isSmartRef__":true,"id":893},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"892":{"this":{"__isSmartRef__":true,"id":0}},"893":{"timestamp":{"__isSmartRef__":true,"id":894},"user":"Dan","tags":[]},"894":{"isSerializedDate":true,"string":"Sat Apr 13 2013 13:59:20 GMT-0700 (PDT)"},"895":{"varMapping":{"__isSmartRef__":true,"id":896},"source":"function onLoad() {\n    this.master.beCommanderMorph(); // re-do wrapping of methods\n    this.updateDisplayMorph();\n}","funcProperties":{"__isSmartRef__":true,"id":897},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"896":{"this":{"__isSmartRef__":true,"id":0}},"897":{"timestamp":{"__isSmartRef__":true,"id":898},"user":"Dan","tags":[]},"898":{"isSerializedDate":true,"string":"Sat Apr 13 2013 13:58:00 GMT-0700 (PDT)"},"899":{"varMapping":{"__isSmartRef__":true,"id":900},"source":"function setSymmetry(evt) {\n    this.menu = new lively.morphic.Menu([]);\n    this.menu.addItems(Array.range(2,13).map(function(i) {\n            return [i.toString(), this, 'setNFold', i]; }, this));\n    this.menu.openIn(this.world(), evt.hand.getPosition(), false, \"Choose number of segments...\");\n}","funcProperties":{"__isSmartRef__":true,"id":901},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"900":{"this":{"__isSmartRef__":true,"id":0}},"901":{"timestamp":{"__isSmartRef__":true,"id":902},"user":"Dan","tags":[]},"902":{"isSerializedDate":true,"string":"Sat Apr 13 2013 11:46:09 GMT-0700 (PDT)"},"isSimplifiedRegistry":true}}