{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":7},{"__isSmartRef__":true,"id":33}],"scripts":[],"id":"85152097-DED7-48B8-9B33-04A4B1DB741A","shape":{"__isSmartRef__":true,"id":77},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"RightSpaceMaker","partsBinMetaInfo":{"__isSmartRef__":true,"id":88},"eventHandler":{"__isSmartRef__":true,"id":94},"derivationIds":[127,"28788505-B6DB-40C1-8651-A40E6BF874CB","D4E5789A-0F1B-476B-9E61-DAE41A9EEC9F","3BEA2266-F0DD-48A2-B67B-8D7A036CE90B","0B1DA5BF-0FE3-46A5-95A8-B1C4AAEA293E"],"prevScroll":[0,0],"moved":true,"isBeingDragged":false,"_ClipMode":"visible","attributeConnections":[{"__isSmartRef__":true,"id":80}],"__serializedExpressions__":["_Position","distanceToDragEvent","lastExtent","minExtent"],"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":95},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)","distanceToDragEvent":"lively.pt(50.6,-20.9)","lastExtent":"lively.pt(70.1,111.3)","minExtent":"lively.pt(70.1,111.3)"},"1":{"submorphs":[],"scripts":[],"id":"A03731E9-A98B-439B-9057-C5F510B34BB0","shape":{"__isSmartRef__":true,"id":2},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"fixedHeight":false,"allowsInput":true,"_FontFamily":"Arial, sans-serif","registeredForMouseEvents":true,"_MaxTextWidth":177.09389138192438,"_MaxTextHeight":null,"showsHalos":false,"_FontSize":14,"name":"Text23","partsBinMetaInfo":{"__isSmartRef__":true,"id":3},"textChunks":[{"__isSmartRef__":true,"id":4}],"charsReplaced":"left","lastFindLoc":16,"prevScroll":[0,0],"eventHandler":{"__isSmartRef__":true,"id":6},"_ClipMode":"visible","derivationIds":[355,"A86066A4-8EB7-45E4-B985-0E466AD97800","7A75BA9B-3AE8-4C83-A444-6B9250BACE56","11925ECB-A568-4385-8369-FB5561CF28B4","829EE64D-F2AA-4696-B274-3A19E5E9AFCF"],"_WhiteSpaceHandling":"pre-wrap","owner":{"__isSmartRef__":true,"id":0},"_MinTextWidth":177.09389138192438,"_MinTextHeight":null,"previousSelection":[14,14],"__serializedExpressions__":["_Position","textColor","_Padding","distanceToDragEvent"],"_Rotation":0,"_Scale":1,"priorSelectionRange":[12,16],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_Position":"lively.pt(2.8,7.9)","textColor":"Color.rgb(0,0,0)","_Padding":"lively.rect(5,5,0,0)","distanceToDragEvent":"lively.pt(126.4,-9.9)"},"2":{"fill":null,"_BorderWidth":0,"_ClipMode":"visible","__serializedExpressions__":["_Position","_Extent","_BorderColor","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(61.8,66.0)","_BorderColor":"Color.rgb(0,0,0)","_Padding":"lively.rect(0,0,0,0)"},"3":{"partsSpaceName":"PartsBin/Basic","migrationLevel":4,"comment":"a simple text morph","partName":"Text","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"4":{"style":{"__isSmartRef__":true,"id":5},"morph":{"__isSmartRef__":true,"id":1},"chunkOwner":{"__isSmartRef__":true,"id":1},"storedString":"make \nspace\nright","_id":"_188","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"5":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"6":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"7":{"submorphs":[{"__isSmartRef__":true,"id":8}],"scripts":[],"id":"C9B3D38E-3869-4A82-8026-3579EA3ED583","shape":{"__isSmartRef__":true,"id":13},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"registeredForMouseEvents":true,"value":false,"toggle":false,"isActive":true,"normalFill":{"__isSmartRef__":true,"id":14},"lighterFill":{"__isSmartRef__":true,"id":19},"label":{"__isSmartRef__":true,"id":8},"name":"ScriptableButton","showsHalos":false,"partsBinMetaInfo":{"__isSmartRef__":true,"id":24},"attributeConnections":[{"__isSmartRef__":true,"id":25},{"__isSmartRef__":true,"id":26}],"doNotSerialize":["$$fire","$$status"],"doNotCopyProperties":["$$fire","$$status"],"eventHandler":{"__isSmartRef__":true,"id":27},"derivationIds":[2588,"34A189FC-92A8-4EA4-AD0A-C16525A6DB57","62157D1B-AB56-40E6-A385-2E0E4EC38C3F","5D1E9094-9F95-48F4-9EE3-E1A3211F6E4A"],"owner":{"__isSmartRef__":true,"id":0},"status":"on","_ClipMode":"visible","isPressed":false,"__serializedExpressions__":["_Position","distanceToDragEvent"],"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":28},"__LivelyClassName__":"lively.morphic.Button","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(10.2,81.6)","distanceToDragEvent":"lively.pt(32.1,-20.3)"},"8":{"submorphs":[],"scripts":[],"id":"941F3FD0-C0D5-436F-A3E7-8C4B3611F770","shape":{"__isSmartRef__":true,"id":9},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"_WhiteSpaceHandling":"pre-wrap","fixedHeight":true,"allowInput":false,"_FontFamily":"Helvetica","registeredForMouseEvents":true,"_MaxTextWidth":44,"_MaxTextHeight":null,"textStyle":null,"owner":{"__isSmartRef__":true,"id":7},"isLabel":true,"eventsAreIgnored":true,"_ClipMode":"hidden","textChunks":[{"__isSmartRef__":true,"id":10}],"_Align":"center","eventHandler":{"__isSmartRef__":true,"id":12},"_HandStyle":"default","_PointerEvents":"none","derivationIds":[2589,"595F28C7-7CB1-4FE2-81BA-E7EB0B7287F6","834D4930-D230-4D31-BD53-978A49A9CDE8","F6B54CDB-C539-4681-977F-0E9BC2D26525"],"_MinTextWidth":44,"_MinTextHeight":null,"_WordBreak":"break-all","_FontSize":10,"__serializedExpressions__":["_Position","padding","_Padding","_TextColor"],"__LivelyClassName__":"lively.morphic.Text","__SourceModuleName__":"Global.lively.morphic.TextCore","_Position":"lively.pt(0.0,0.0)","padding":"lively.rect(5,5,0,0)","_Padding":"lively.rect(0,0,0,0)","_TextColor":"Color.rgb(0,0,0)"},"9":{"_BorderWidth":0,"_Fill":null,"_ClipMode":"hidden","__serializedExpressions__":["position","_Extent","_BorderColor","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(44.0,21.0)","_BorderColor":"Color.rgb(0,0,0)","_Padding":"lively.rect(0,3,0,0)"},"10":{"style":{"__isSmartRef__":true,"id":11},"chunkOwner":{"__isSmartRef__":true,"id":8},"_id":"_2075","storedString":"on","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"11":{"textShadow":"0px 1px 0 rgba(255,255,255,1)","__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"12":{"morph":{"__isSmartRef__":true,"id":8},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"13":{"_BorderWidth":1.1840000000000002,"_Fill":{"__isSmartRef__":true,"id":14},"_BorderRadius":5.2,"_ClipMode":"visible","__serializedExpressions__":["position","_Extent","_BorderColor","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(44.0,21.0)","_BorderColor":"Color.rgb(214,214,214)","_Padding":"lively.rect(0,0,0,0)"},"14":{"stops":[{"__isSmartRef__":true,"id":15},{"__isSmartRef__":true,"id":16},{"__isSmartRef__":true,"id":17},{"__isSmartRef__":true,"id":18}],"__serializedExpressions__":["vector"],"__LivelyClassName__":"lively.morphic.LinearGradient","__SourceModuleName__":"Global.lively.morphic.Shapes","vector":"lively.rect(0,0,0,1)"},"15":{"offset":0,"__serializedExpressions__":["color"],"color":"Color.rgb(245,245,245)"},"16":{"offset":0.4,"__serializedExpressions__":["color"],"color":"Color.rgb(209,209,209)"},"17":{"offset":0.6,"__serializedExpressions__":["color"],"color":"Color.rgb(209,209,209)"},"18":{"offset":1,"__serializedExpressions__":["color"],"color":"Color.rgb(240,240,240)"},"19":{"stops":[{"__isSmartRef__":true,"id":20},{"__isSmartRef__":true,"id":21},{"__isSmartRef__":true,"id":22},{"__isSmartRef__":true,"id":23}],"__serializedExpressions__":["vector"],"__LivelyClassName__":"lively.morphic.LinearGradient","__SourceModuleName__":"Global.lively.morphic.Shapes","vector":"lively.rect(0,0,0,1)"},"20":{"offset":0,"__serializedExpressions__":["color"],"color":"Color.rgb(250,250,250)"},"21":{"offset":0.4,"__serializedExpressions__":["color"],"color":"Color.rgb(232,232,232)"},"22":{"offset":0.6,"__serializedExpressions__":["color"],"color":"Color.rgb(232,232,232)"},"23":{"offset":1,"__serializedExpressions__":["color"],"color":"Color.rgb(248,248,248)"},"24":{"partsSpaceName":"PartsBin/Inputs","migrationLevel":2,"partName":"ScriptableButton","comment":"Has a script that is called on button press","revisionOnLoad":148802,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"25":{"sourceObj":{"__isSmartRef__":true,"id":7},"sourceAttrName":"fire","targetObj":{"__isSmartRef__":true,"id":7},"targetMethodName":"onFire","__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"26":{"sourceObj":{"__isSmartRef__":true,"id":7},"sourceAttrName":"status","targetObj":{"__isSmartRef__":true,"id":7},"targetMethodName":"setLabel","__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"27":{"morph":{"__isSmartRef__":true,"id":7},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"28":{"onFire":{"__isSmartRef__":true,"id":29}},"29":{"varMapping":{"__isSmartRef__":true,"id":30},"source":"function onFire() {\n    if (this.status === 'on') {\n        this.owner.attributeConnections.first().disconnect()\n        this.status = 'off'\n    }\n    else if (this.status === 'off') {\n        this.owner.reset()\n        this.status = 'on'\n    }\n}","funcProperties":{"__isSmartRef__":true,"id":31},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"30":{"this":{"__isSmartRef__":true,"id":7}},"31":{"timestamp":{"__isSmartRef__":true,"id":32},"user":"undefined","tags":[]},"32":{"isSerializedDate":true,"string":"Sat Mar 31 2012 21:04:47 GMT+0200 (CEST)"},"33":{"submorphs":[],"scripts":[],"id":"39BA7127-D365-4ACD-A9BC-C797A825F086","shape":{"__isSmartRef__":true,"id":34},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"__serializedExpressions__":["_Position","originalExtent"],"showsHalos":false,"name":"ResizeCorner2","partsBinMetaInfo":{"__isSmartRef__":true,"id":35},"draggingEnabled":true,"dragStartPoint":null,"originalTargetExtent":null,"eventHandler":{"__isSmartRef__":true,"id":37},"originalTargetInnerBounds":null,"isResizeCorner":true,"relativeOrigin":null,"derivationIds":[7147,"16E962DF-21E9-4FE6-8B9B-953F0E908113","ADD0B5C0-0DC6-4D8E-9C2A-0EC7E3C71F21"],"moved":true,"attributeConnections":[{"__isSmartRef__":true,"id":38}],"doNotSerialize":["$$cornerName"],"doNotCopyProperties":["$$cornerName"],"originalTargetBounds":null,"cornerName":"bottomRight","_ClipMode":"visible","owner":{"__isSmartRef__":true,"id":0},"_Rotation":0,"_Scale":1,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":39},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(60.1,101.3)","originalExtent":"lively.pt(239.0,138.0)"},"34":{"__serializedExpressions__":["position","_Extent","_BorderColor","_Fill","_Padding"],"_BorderWidth":0,"_ClipMode":"visible","__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(10.0,10.0)","_BorderColor":"Color.rgb(145,145,145)","_Fill":"Color.rgb(66,66,66)","_Padding":"lively.rect(0,0,0,0)"},"35":{"partsSpaceName":"PartsBin/Widgets/","migrationLevel":2,"comment":"Resize an object without using halos.","partName":"ResizeCorner","lastModifiedDate":{"__isSmartRef__":true,"id":36},"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"36":{"isSerializedDate":true,"string":"Thu Mar 07 2013 01:25:14 GMT+0100 (CET)"},"37":{"morph":{"__isSmartRef__":true,"id":33},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"38":{"sourceObj":{"__isSmartRef__":true,"id":33},"sourceAttrName":"cornerName","targetObj":{"__isSmartRef__":true,"id":33},"targetMethodName":"alignToOwner","__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"39":{"onDrag":{"__isSmartRef__":true,"id":40},"onDragEnd":{"__isSmartRef__":true,"id":48},"onDragStart":{"__isSmartRef__":true,"id":56},"reset":{"__isSmartRef__":true,"id":64},"morphMenuItems":{"__isSmartRef__":true,"id":67},"alignToOwner":{"__isSmartRef__":true,"id":74}},"40":{"varMapping":{"__isSmartRef__":true,"id":41},"source":"function onDrag(evt) {\n    // alert(\"onDrag\")\n    // this.owner.setPosition(pt(0,0))\n    // this.owner.setOrigin(pt(0,0))\n    var moveDelta = evt.mousePoint.subPt(this.dragStartPoint)\n    \n    // moveDelta = moveDelta.maxPt(pt(0,0))\n    var ownerExtent = this.owner.getExtent();\n\n    // TODO does not work\n    if (evt.isShiftDown()) {\n        var maxDelta = Math.max(moveDelta.x, moveDelta.y);\n        if (maxDelta == 0) return;\n        var factor = ownerExtent.x /  ownerExtent.y\n        moveDelta = pt(maxDelta * factor, maxDelta )\n    }\n    var accessor = \"with\" + this.cornerName.charAt(0).toUpperCase() + this.cornerName.substring(1);\n\n    var newCorner = this.originalTargetBounds[this.cornerName]().addPt(moveDelta);\n    var newBounds = this.originalTargetBounds[accessor ](newCorner);\n\n    this.owner.setBounds(newBounds);\n   \n    // var newExtent = this.originalTargetExtent.addPt(moveDelta)\n    // alertOK(\"new extent\" + newExtent)\n    // this.owner.setExtent(newExtent);\n    this.owner.submorphs.select(function(ea) {\n        return ea.isResizeCorner\n    }).invoke('alignToOwner');\n    if (this.owner.halos) {\n        this.owner.halos.invoke('alignAtTarget')\n    }\n    // alertOK(\"relative \" + this.relativeOrigin)\n    var newOrigin =  pt(0,0).extent(this.owner.getExtent()).relativeToAbsPoint(this.relativeOrigin)\n\n    // TODO IMPLEMENT updating the origin does not work yet\n    // this.owner.setOrigin(newOrigin);\n    // alertOK(\"new origin \" + newOrigin)\n\n}","funcProperties":{"__isSmartRef__":true,"id":46},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"41":{"this":{"__isSmartRef__":true,"id":33},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":42}},"42":{"$super":{"__isSmartRef__":true,"id":43}},"43":{"varMapping":{"__isSmartRef__":true,"id":44},"source":"function () {\n                    try {\n                        return obj.constructor.prototype[name].apply(obj, arguments)\n                    } catch (e) {\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                        return null;\n                    }\n                }","funcProperties":{"__isSmartRef__":true,"id":45},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"44":{"obj":{"__isSmartRef__":true,"id":33},"name":"onDrag"},"45":{},"46":{"timestamp":{"__isSmartRef__":true,"id":47},"user":"sstamm","tags":[]},"47":{"isSerializedDate":true,"string":"Thu Feb 23 2012 12:08:52 GMT+0100 (CET)"},"48":{"varMapping":{"__isSmartRef__":true,"id":49},"source":"function onDragEnd(evt) {\n    this.dragStartPoint = null;\n    this.originalTargetBounds = null;\n    this.relativeOrigin = null;\n}","funcProperties":{"__isSmartRef__":true,"id":54},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"49":{"this":{"__isSmartRef__":true,"id":33},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":50}},"50":{"$super":{"__isSmartRef__":true,"id":51}},"51":{"varMapping":{"__isSmartRef__":true,"id":52},"source":"function () {\n                    try {\n                        return obj.constructor.prototype[name].apply(obj, arguments)\n                    } catch (e) {\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                        return null;\n                    }\n                }","funcProperties":{"__isSmartRef__":true,"id":53},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"52":{"obj":{"__isSmartRef__":true,"id":33},"name":"onDragEnd"},"53":{},"54":{"timestamp":{"__isSmartRef__":true,"id":55},"user":"sstamm","tags":[]},"55":{"isSerializedDate":true,"string":"Thu Feb 23 2012 12:09:00 GMT+0100 (CET)"},"56":{"varMapping":{"__isSmartRef__":true,"id":57},"source":"function onDragStart(evt) {\n    var absToRelativePoint =  function (r, absPt) {\n\t\treturn new Point(\n\t\t\t(absPt.x - r.x) / r.width,\n\t\t\t(absPt.y - r.y) / r.height)\n\t}\n    // absToRelativePoint(new Rectangle(10,10,100,100), pt(20,20))\n    // absToRelativePoint(new Rectangle(10,10,100,100), pt(0,0))\n    // absToRelativePoint(new Rectangle(-100,-100,200,200), pt(0,0))\n\n\n    this.dragStartPoint = evt.mousePoint;\n    this.originalTargetBounds= this.owner.bounds();\n    this.relativeOrigin =  absToRelativePoint(pt(0,0).extent(this.owner.getExtent()), this.owner.getOrigin())\n}","funcProperties":{"__isSmartRef__":true,"id":62},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"57":{"this":{"__isSmartRef__":true,"id":33},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":58}},"58":{"$super":{"__isSmartRef__":true,"id":59}},"59":{"varMapping":{"__isSmartRef__":true,"id":60},"source":"function () {\n                    try {\n                        return obj.constructor.prototype[name].apply(obj, arguments)\n                    } catch (e) {\n                        alert('Error in $super call: ' + e + '\\n' + e.stack);\n                        return null;\n                    }\n                }","funcProperties":{"__isSmartRef__":true,"id":61},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"60":{"obj":{"__isSmartRef__":true,"id":33},"name":"onDragStart"},"61":{},"62":{"timestamp":{"__isSmartRef__":true,"id":63},"user":"sstamm","tags":[]},"63":{"isSerializedDate":true,"string":"Thu Feb 23 2012 12:08:40 GMT+0100 (CET)"},"64":{"varMapping":{"__isSmartRef__":true,"id":65},"source":"function reset() {\n    this.isResizeCorner = true\n    this.cornerName = 'bottomRight'\n    this.setExtent(pt(10,10));\n    this.setPosition(pt(0,0))\n}","funcProperties":{"__isSmartRef__":true,"id":66},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"65":{"this":{"__isSmartRef__":true,"id":33}},"66":{},"67":{"varMapping":{"__isSmartRef__":true,"id":68},"source":"function morphMenuItems() {\n    return $super().concat([\n        [\"corner\", [\n            [\"top left\", function() { this.cornerName = 'topLeft'}.bind(this)],\n            [\"top right\", function() { this.cornerName = 'topRight'}.bind(this)],\n            [\"bottom right\", function() { this.cornerName = 'bottomRight'}.bind(this)],\n            [\"bottom left\", function() { this.cornerName = 'bottomLeft'}.bind(this)],\n        ]]\n    ])\t\n}","funcProperties":{"__isSmartRef__":true,"id":73},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"68":{"this":{"__isSmartRef__":true,"id":33},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":69}},"69":{"$super":{"__isSmartRef__":true,"id":70}},"70":{"varMapping":{"__isSmartRef__":true,"id":71},"source":"function () {\n\t\t\t\ttry {\n\t\t\t\t\treturn obj.constructor.prototype[name].apply(obj, arguments)\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert('Error in $super call: ' + e + '\\n' + e.stack);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}","funcProperties":{"__isSmartRef__":true,"id":72},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"71":{"obj":{"__isSmartRef__":true,"id":33},"name":"morphMenuItems"},"72":{},"73":{},"74":{"varMapping":{"__isSmartRef__":true,"id":75},"source":"function alignToOwner() {\n    this.align(this.bounds()[this.cornerName](), this.owner.shape.bounds()[this.cornerName]() )\n}","funcProperties":{"__isSmartRef__":true,"id":76},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"75":{"this":{"__isSmartRef__":true,"id":33}},"76":{},"77":{"_BorderWidth":1,"_ClipMode":"visible","_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","attributeConnections":[{"__isSmartRef__":true,"id":78}],"doNotSerialize":["$$_Extent"],"doNotCopyProperties":["$$_Extent"],"__serializedExpressions__":["position","_BorderColor","_Fill","_Padding","_Extent"],"__LivelyClassName__":"lively.morphic.Shapes.Rectangle","__SourceModuleName__":"Global.lively.morphic.Shapes","position":"lively.pt(0.0,0.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(255,143,0)","_Padding":"lively.rect(0,0,0,0)","_Extent":"lively.pt(70.1,111.3)"},"78":{"sourceObj":{"__isSmartRef__":true,"id":77},"sourceAttrName":"_Extent","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"extentChanged","varMapping":{"__isSmartRef__":true,"id":79},"dependedBy":{"__isSmartRef__":true,"id":80},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"79":{"source":{"__isSmartRef__":true,"id":77},"target":{"__isSmartRef__":true,"id":0}},"80":{"sourceObj":{"__isSmartRef__":true,"id":0},"sourceAttrName":"extent","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"extentChanged","varMapping":{"__isSmartRef__":true,"id":81},"dependendConnections":[{"__isSmartRef__":true,"id":78}],"attributeConnections":[{"__isSmartRef__":true,"id":82},{"__isSmartRef__":true,"id":84},{"__isSmartRef__":true,"id":86}],"doNotSerialize":["$$converterString","$$updaterString","$$varMapping"],"doNotCopyProperties":["$$converterString","$$updaterString","$$varMapping"],"__LivelyClassName__":"lively.morphic.GeometryConnection","__SourceModuleName__":"Global.lively.bindings.GeometryBindings"},"81":{"source":{"__isSmartRef__":true,"id":0},"target":{"__isSmartRef__":true,"id":0}},"82":{"sourceObj":{"__isSmartRef__":true,"id":80},"sourceAttrName":"converterString","targetObj":{"__isSmartRef__":true,"id":78},"targetMethodName":"setConverter","varMapping":{"__isSmartRef__":true,"id":83},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"83":{"source":{"__isSmartRef__":true,"id":80},"target":{"__isSmartRef__":true,"id":78}},"84":{"sourceObj":{"__isSmartRef__":true,"id":80},"sourceAttrName":"updaterString","targetObj":{"__isSmartRef__":true,"id":78},"targetMethodName":"setUpdater","varMapping":{"__isSmartRef__":true,"id":85},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"85":{"source":{"__isSmartRef__":true,"id":80},"target":{"__isSmartRef__":true,"id":78}},"86":{"sourceObj":{"__isSmartRef__":true,"id":80},"sourceAttrName":"varMapping","targetObj":{"__isSmartRef__":true,"id":78},"targetMethodName":"varMapping","varMapping":{"__isSmartRef__":true,"id":87},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"87":{"source":{"__isSmartRef__":true,"id":80},"target":{"__isSmartRef__":true,"id":78}},"88":{"partsSpaceName":"PartsBin/Tools/","comment":"A simple tool to make space between morphs","migrationLevel":4,"partName":"RightSpaceMaker","changes":[{"__isSmartRef__":true,"id":89},{"__isSmartRef__":true,"id":91}],"lastModifiedDate":{"__isSmartRef__":true,"id":93},"revisionOnLoad":149100,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin"},"89":{"date":{"__isSmartRef__":true,"id":90},"author":"undefined","message":"","id":"A7217852-C358-4454-AD72-3239C75761FF"},"90":{"isSerializedDate":true,"string":"Tue Feb 21 2012 21:08:16 GMT+0100 (CET)"},"91":{"date":{"__isSmartRef__":true,"id":92},"author":"jenslincke","message":"no comment","id":"ED0F6E59-E347-46B7-9898-37658E03DEAE"},"92":{"isSerializedDate":true,"string":"Mon Mar 18 2013 16:23:41 GMT+0100 (CET)"},"93":{"isSerializedDate":true,"string":"Thu Mar 07 2013 01:25:14 GMT+0100 (CET)"},"94":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"95":{"extentChanged":{"__isSmartRef__":true,"id":96},"reset":{"__isSmartRef__":true,"id":100},"setExtent":{"__isSmartRef__":true,"id":104}},"96":{"varMapping":{"__isSmartRef__":true,"id":97},"source":"function extentChanged(extent) {\n    if (this.lastExtent == undefined)\n        this.lastExtent = extent\n    var delta = extent.subPt(this.lastExtent)\n    // alertOK(\"change \" + delta) \n    this.lastExtent = extent\n\n    var myX = this.getPosition().x\n\n    var morphsToMove = this.owner.submorphs.select(function(ea) {\n        return ea.getPosition().x > myX\n    })\n\n    // for now only move down\n    morphsToMove.forEach(function(ea) {\n        ea.moveBy(pt(delta.x, 0))\n    })\n\n\n}","funcProperties":{"__isSmartRef__":true,"id":98},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"97":{"this":{"__isSmartRef__":true,"id":0}},"98":{"timestamp":{"__isSmartRef__":true,"id":99},"user":"jenslincke","tags":[]},"99":{"isSerializedDate":true,"string":"Mon Mar 18 2013 16:18:14 GMT+0100 (CET)"},"100":{"varMapping":{"__isSmartRef__":true,"id":101},"source":"function reset() {\n    this.lastExtent = undefined\n    connect(this, 'extent', this, 'extentChanged')\n    // this.minExtent = null\n    this.minExtent = this.getExtent()\n    \n    \n}","funcProperties":{"__isSmartRef__":true,"id":102},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"101":{"this":{"__isSmartRef__":true,"id":0}},"102":{"timestamp":{"__isSmartRef__":true,"id":103},"user":"jenslincke","tags":[]},"103":{"isSerializedDate":true,"string":"Mon Mar 18 2013 16:20:30 GMT+0100 (CET)"},"104":{"varMapping":{"__isSmartRef__":true,"id":105},"source":"function setExtent(e) {\n    // don't change height\n    // $super(e)\n    $super(pt(e.x, this.getExtent().z))\n}","funcProperties":{"__isSmartRef__":true,"id":110},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"105":{"this":{"__isSmartRef__":true,"id":0},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":106}},"106":{"$super":{"__isSmartRef__":true,"id":107}},"107":{"varMapping":{"__isSmartRef__":true,"id":108},"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":109},"__LivelyClassName__":"lively.Closure","__SourceModuleName__":"Global.lively.lang.Closure"},"108":{"obj":{"__isSmartRef__":true,"id":0},"name":"setExtent"},"109":{},"110":{"timestamp":{"__isSmartRef__":true,"id":111},"user":"jenslincke","tags":[]},"111":{"isSerializedDate":true,"string":"Mon Mar 18 2013 16:20:35 GMT+0100 (CET)"},"isSimplifiedRegistry":true}}