{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":15}],"scripts":[],"id":1352,"shape":{"__isSmartRef__":true,"id":37},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":43},"showsHalos":false,"partsBinMetaInfo":{"__isSmartRef__":true,"id":44},"__SourceModuleName__":"Global.lively.morphic.Core","__layered_draggingEnabled__":true,"dropColor":{"__isSmartRef__":true,"id":14},"priorExtent":{"__isSmartRef__":true,"id":45},"attributeConnections":[{"__isSmartRef__":true,"id":46}],"doNotSerialize":["$$name"],"doNotCopyProperties":["$$name"],"_traitConfig_":{"__isSmartRef__":true,"id":47},"renderContextTable":{"__isSmartRef__":true,"id":49},"eventHandler":{"__isSmartRef__":true,"id":50},"isLockOwner":false,"name":"ColorBehavior","_Rotation":0,"_Scale":1.0060210561262526,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":51},"__LivelyClassName__":"lively.morphic.Box","withLayers":["Global.lively.morphic.GrabbingLayer"]},"1":{"submorphs":[],"scripts":[],"id":1353,"shape":{"__isSmartRef__":true,"id":2},"droppingEnabled":true,"halosEnabled":true,"__layered_draggingEnabled__":true,"registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":8},"showsHalos":false,"name":"colorField","partsBinMetaInfo":{"__isSmartRef__":true,"id":9},"__SourceModuleName__":"Global.lively.morphic.ColorChooserDraft","owner":{"__isSmartRef__":true,"id":0},"attributeConnections":[{"__isSmartRef__":true,"id":10}],"doNotSerialize":["$$color"],"doNotCopyProperties":["$$color"],"priorExtent":{"__isSmartRef__":true,"id":11},"renderContextTable":{"__isSmartRef__":true,"id":12},"eventHandler":{"__isSmartRef__":true,"id":13},"isLockOwner":false,"color":{"__isSmartRef__":true,"id":14},"_Rotation":0,"_Scale":1,"grabbingEnabled":false,"__LivelyClassName__":"lively.morphic.ColorField"},"2":{"position":{"__isSmartRef__":true,"id":3},"_Extent":{"__isSmartRef__":true,"id":4},"_BorderWidth":1,"_BorderColor":{"__isSmartRef__":true,"id":5},"_Fill":{"__isSmartRef__":true,"id":6},"__SourceModuleName__":"Global.lively.morphic.Shapes","renderContextTable":{"__isSmartRef__":true,"id":7},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"3":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"4":{"x":42,"y":19,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"5":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"6":{"r":0.619,"g":0,"b":0,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"7":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"8":{"x":25,"y":7,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"9":{"partsSpaceName":"PartsBin/NewWorld","__SourceModuleName__":"Global.lively.PartsBin","requiredModules":["lively.morphic.ColorChooserDraft"],"migrationLevel":1,"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"10":{"sourceObj":{"__isSmartRef__":true,"id":1},"sourceAttrName":"color","targetObj":{"__isSmartRef__":true,"id":0},"targetMethodName":"setDropColor","__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"11":{"x":42,"y":20,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"12":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"13":{"morph":{"__isSmartRef__":true,"id":1},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"14":{"r":0.619,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"15":{"submorphs":[],"scripts":[],"id":1354,"shape":{"__isSmartRef__":true,"id":16},"grabbingEnabled":false,"droppingEnabled":false,"halosEnabled":true,"fixedWidth":true,"fixedHeight":false,"allowsInput":true,"_OverflowMode":"visible","_FontFamily":"Arial, sans-serif","registeredForMouseEvents":true,"_Position":{"__isSmartRef__":true,"id":21},"_MaxTextWidth":73.8018403394826,"_MaxTextHeight":null,"textColor":{"__isSmartRef__":true,"id":19},"showsHalos":false,"_FontSize":8,"__SourceModuleName__":"Global.lively.morphic.TextCore","name":"NameLabel","partsBinMetaInfo":{"__isSmartRef__":true,"id":22},"textChunks":[{"__isSmartRef__":true,"id":23}],"charsReplaced":"Grr","lastFindLoc":-3,"priorSelectionRange":[0,13],"prevScroll":[0,0],"priorExtent":{"__isSmartRef__":true,"id":25},"attributeConnections":[{"__isSmartRef__":true,"id":26},{"__isSmartRef__":true,"id":27}],"doNotSerialize":["$$owner","$$savedTextString"],"doNotCopyProperties":["$$owner","$$savedTextString"],"oldOwner":{"__isSmartRef__":true,"id":0},"isInputLine":true,"eventsAreIgnored":true,"renderContextTable":{"__isSmartRef__":true,"id":28},"eventHandler":{"__isSmartRef__":true,"id":29},"_HandStyle":"default","_PointerEvents":"none","isLockOwner":false,"owner":{"__isSmartRef__":true,"id":0},"savedTextString":"TopLeft","_Rotation":0,"_Scale":1.0030060100150207,"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":30},"__LivelyClassName__":"lively.morphic.Text"},"16":{"fill":null,"__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":{"__isSmartRef__":true,"id":17},"_Extent":{"__isSmartRef__":true,"id":18},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":19},"renderContextTable":{"__isSmartRef__":true,"id":20},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"17":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"18":{"x":73.8018403394826,"y":12,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"19":{"r":0,"g":0,"b":0,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"20":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"21":{"x":13,"y":31,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"22":{"partsSpaceName":"PartsBin/NewWorld","__SourceModuleName__":"Global.lively.PartsBin","migrationLevel":2,"comment":"Label that shows the name of a morph. Updates automatically.","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"23":{"style":{"__isSmartRef__":true,"id":24},"chunkOwner":{"__isSmartRef__":true,"id":15},"storedString":"ColorBehavior","__LivelyClassName__":"lively.morphic.TextChunk","__SourceModuleName__":"Global.lively.morphic.TextCore"},"24":{"__LivelyClassName__":"lively.morphic.TextEmphasis","__SourceModuleName__":"Global.lively.morphic.TextCore"},"25":{"x":73.8018403394826,"y":12,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"26":{"sourceObj":{"__isSmartRef__":true,"id":15},"sourceAttrName":"owner","targetObj":{"__isSmartRef__":true,"id":15},"targetMethodName":"updateLabel","converter":null,"converterString":null,"updater":null,"updaterString":null,"__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"27":{"sourceObj":{"__isSmartRef__":true,"id":15},"sourceAttrName":"savedTextString","targetObj":{"__isSmartRef__":true,"id":15},"targetMethodName":"renameOwner","__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"28":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML","updateText":"updateTextHTML","setTextExtent":"setTextExtentHTML","setMaxTextWidth":"setMaxTextWidthHTML","setMaxTextHeight":"setMaxTextHeightHTML","getTextExtent":"getTextExtentHTML","getTextString":"getTextStringHTML","ignoreTextEvents":"ignoreTextEventsHTML","enableTextEvents":"enableTextEventsHTML","setFontFamily":"setFontFamilyHTML","setFontSize":"setFontSizeHTML","setTextColor":"setTextColorHTML","setPadding":"setPaddingHTML","setAlign":"setAlignHTML","setVerticalAlign":"setVerticalAlignHTML","setDisplay":"setDisplayHTML","setWhiteSpaceHandling":"setWhiteSpaceHandlingHTML"},"29":{"morph":{"__isSmartRef__":true,"id":15},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"30":{"updateLabel":{"__isSmartRef__":true,"id":31},"renameOwner":{"__isSmartRef__":true,"id":34}},"31":{"varMapping":{"__isSmartRef__":true,"id":32},"source":"function updateLabel() {\n\t// observe name changes in owner\n\tif (this.owner !== this.oldOwner) {\n\t\tif (this.oldOwner)\n\t\t\tdisconnect(this.oldOwner, 'name', this, 'updateLabel')\n\t\tif (this.owner)\n\t\t\tconnect(this.owner, 'name', this, 'updateLabel')\n\t\tthis.oldOwner = this.owner\n\t}\n\tvar name = (this.owner ? this.owner.name : \"no owner\")\n\tif (this.textString != name)\n\tthis.setTextString(name)\n}","funcProperties":{"__isSmartRef__":true,"id":33},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"32":{"this":{"__isSmartRef__":true,"id":15}},"33":{},"34":{"varMapping":{"__isSmartRef__":true,"id":35},"source":"function renameOwner(name) {\n\tif (this.owner && this.owner.name != name) {\n\t\talertOK(\"renamed \" + this.owner + \" to \" + name)\n\t\tthis.owner.setName(name);\n\t}\n}","funcProperties":{"__isSmartRef__":true,"id":36},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"35":{"this":{"__isSmartRef__":true,"id":15}},"36":{},"37":{"position":{"__isSmartRef__":true,"id":38},"_Extent":{"__isSmartRef__":true,"id":39},"_BorderWidth":0,"_BorderColor":{"__isSmartRef__":true,"id":40},"_Fill":{"__isSmartRef__":true,"id":41},"__SourceModuleName__":"Global.lively.morphic.Shapes","_BorderRadius":20.71,"renderContextTable":{"__isSmartRef__":true,"id":42},"__LivelyClassName__":"lively.morphic.Shapes.Rectangle"},"38":{"x":0,"y":0,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"39":{"x":92,"y":53,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"40":{"r":0.113,"g":0,"b":0.599,"a":1,"__SourceModuleName__":"Global","__LivelyClassName__":"Color"},"41":{"r":0.8,"g":0.8,"b":0.8,"a":1,"__LivelyClassName__":"Color","__SourceModuleName__":"Global"},"42":{"init":"initHTML","appendShape":"renderHTML","setPosition":"setPositionHTML","setExtent":"setExtentHTML","setFill":"setFillHTML","setBorderColor":"setBorderColorHTML","setBorderWidth":"setBorderWidthHTML","setStrokeOpacity":"setStrokeOpacityHTML","setBorderRadius":"setBorderRadiusHTML","setBorderStyle":"setBorderStyleHTML","setOpacity":"setOpacityHTML"},"43":{"x":0,"y":0,"__LivelyClassName__":"Point","__SourceModuleName__":"Global"},"44":{"partsSpaceName":"PartsBin/DroppableBehaviors/","__SourceModuleName__":"Global.lively.PartsBin","comment":"A simple box morph","migrationLevel":4,"partName":"ColorBehavior","__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo"},"45":{"x":92,"y":54,"__SourceModuleName__":"Global","__LivelyClassName__":"Point"},"46":{"sourceObj":{"__isSmartRef__":true,"id":0},"sourceAttrName":"name","targetObj":{"__isSmartRef__":true,"id":15},"targetMethodName":"updateLabel","__SourceModuleName__":"Global.lively.bindings","__LivelyClassName__":"AttributeConnection"},"47":{"options":{"__isSmartRef__":true,"id":48}},"48":{"override":["onDragStart","onDragEnd","dropOn"]},"49":{"replaceRenderContext":"replaceRenderContextHTML","init":"initHTML","append":"appendHTML","remove":"removeHTML","triggerEvent":"triggerEventHTML","setTransform":"setTransformHTML","setPosition":"setPositionHTML","setRotation":"setRotationHTML","setExtent":"setExtentHTML","setScale":"setScaleHTML","setVisible":"setVisibleHTML","setOrigin":"setOriginHTML","setPivotPoint":"setPivotPointHTML","setClipMode":"setClipModeHTML","setHandStyle":"setHandStyleHTML","setPointerEvents":"setPointerEventsHTML","setToolTip":"setToolTipHTML","focus":"focusHTML","blur":"blurHTML","setFocusable":"setFocusableHTML"},"50":{"morph":{"__isSmartRef__":true,"id":0},"__SourceModuleName__":"Global.lively.morphic.Events","__LivelyClassName__":"lively.morphic.EventHandler"},"51":{"setDropColor":{"__isSmartRef__":true,"id":52},"applyTo":{"__isSmartRef__":true,"id":55},"reset":{"__isSmartRef__":true,"id":58},"setupConnections":{"__isSmartRef__":true,"id":61},"onLoadFromPartsBin":{"__isSmartRef__":true,"id":64}},"52":{"varMapping":{"__isSmartRef__":true,"id":53},"source":"function setDropColor(color) {\n\tthis.dropColor = color;\n}","funcProperties":{"__isSmartRef__":true,"id":54},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"53":{"this":{"__isSmartRef__":true,"id":0}},"54":{},"55":{"varMapping":{"__isSmartRef__":true,"id":56},"source":"function applyTo(morph) {\n\t// this.targets.morph.\n\tmorph.setFill(this.dropColor)\n}","funcProperties":{"__isSmartRef__":true,"id":57},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"56":{"this":{"__isSmartRef__":true,"id":0}},"57":{},"58":{"varMapping":{"__isSmartRef__":true,"id":59},"source":"function reset() {\n\tthis.applyStyle({enableDragging: true})\n}","funcProperties":{"__isSmartRef__":true,"id":60},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"59":{"this":{"__isSmartRef__":true,"id":0}},"60":{},"61":{"varMapping":{"__isSmartRef__":true,"id":62},"source":"function setupConnections() {\n\tconnect(this.get('colorField'), 'color', this, 'setDropColor')\n}","funcProperties":{"__isSmartRef__":true,"id":63},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"62":{"this":{"__isSmartRef__":true,"id":0}},"63":{},"64":{"varMapping":{"__isSmartRef__":true,"id":65},"source":"function onLoadFromPartsBin() {\n\t$super();\n\tTrait('lively.morphic.DraggableBehavior').applyTo(this, {override: ['onDragStart', 'onDragEnd', 'dropOn']});\n}","funcProperties":{"__isSmartRef__":true,"id":70},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"65":{"this":{"__isSmartRef__":true,"id":0},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":66}},"66":{"$super":{"__isSmartRef__":true,"id":67}},"67":{"varMapping":{"__isSmartRef__":true,"id":68},"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":69},"__SourceModuleName__":"Global","__LivelyClassName__":"lively.Closure"},"68":{"obj":{"__isSmartRef__":true,"id":0},"name":"onLoadFromPartsBin"},"69":{},"70":{},"isSimplifiedRegistry":true}}