{"id":0,"registry":{"0":{"submorphs":[{"__isSmartRef__":true,"id":1},{"__isSmartRef__":true,"id":5}],"scripts":[],"id":"46E81905-CA1E-4354-9F32-F2C2AF3290C0","shape":{"__isSmartRef__":true,"id":74},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"ImageVoter","partsBinMetaInfo":{"__isSmartRef__":true,"id":75},"eventHandler":{"__isSmartRef__":true,"id":97},"derivationIds":[127,"F0291F62-F100-480C-AEBF-0230398F7983","AE8B5ED7-E305-45BC-BE4A-1C28A49EE12B","39BA345C-17FA-45A0-BAC2-F0CF5654ACF8","FE91EA31-D8AE-461B-8A49-95DA5FBAE5B4","F38439A3-2F4E-4AC2-BF73-2633C00B1393","6748F5B5-2284-4748-A6EE-F1A261CBAD0B","BBAFB862-93AE-4F89-BCFF-9F1C67B7FE4C","7EC17E78-593A-4CC8-B7E3-859BCBBFE785","BD8BECDB-A9A1-4009-B433-C925F0AFCCFC","F2677A9D-5855-4DF2-B248-94545B34B762","D52188B3-7DC0-410E-96B1-50892AC00A37"],"partTests":{"__isSmartRef__":true,"id":98},"_ClipMode":"visible","moved":true,"isBeingDragged":false,"layout":{"__isSmartRef__":true,"id":103},"isInLayoutCycle":false,"_Rotation":0,"_Scale":1,"draggingEnabled":false,"grabbingEnabled":false,"__serializedExpressions__":["_Position"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":104},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(0.0,0.0)"},"1":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":2},"_ClipMode":"visible","derivationIds":["B9A73DF3-1AB3-46C4-8D32-B2FEED614377"],"id":"9BA21CAF-0651-4FAC-9ABE-7A0C3C48C71B","droppingEnabled":true,"halosEnabled":true,"eventHandler":{"__isSmartRef__":true,"id":3},"showsHalos":false,"_StyleClassNames":["Morph","Image"],"name":"Image","owner":{"__isSmartRef__":true,"id":0},"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"layout":{"__isSmartRef__":true,"id":4},"_Rotation":0,"_Scale":1,"draggingEnabled":false,"grabbingEnabled":false,"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(20.0,6.9)"},"2":{"_ImageURL":"http://lively-web.org/core/media/cdg-logos/0.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(150.0,86.2)","_Padding":"lively.rect(0,0,0,0)"},"3":{"morph":{"__isSmartRef__":true,"id":1},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"4":{"centeredVertical":false,"centeredHorizontal":true},"5":{"submorphs":[{"__isSmartRef__":true,"id":6},{"__isSmartRef__":true,"id":9},{"__isSmartRef__":true,"id":12},{"__isSmartRef__":true,"id":15},{"__isSmartRef__":true,"id":18}],"scripts":[],"id":"716FBB82-211D-4F36-A1F3-15981A4FD4EF","shape":{"__isSmartRef__":true,"id":21},"droppingEnabled":true,"halosEnabled":true,"registeredForMouseEvents":true,"showsHalos":false,"name":"StarRating","partsBinMetaInfo":{"__isSmartRef__":true,"id":22},"eventHandler":{"__isSmartRef__":true,"id":45},"derivationIds":[127,"F0291F62-F100-480C-AEBF-0230398F7983","AE8B5ED7-E305-45BC-BE4A-1C28A49EE12B","39BA345C-17FA-45A0-BAC2-F0CF5654ACF8","FE91EA31-D8AE-461B-8A49-95DA5FBAE5B4","F38439A3-2F4E-4AC2-BF73-2633C00B1393","6748F5B5-2284-4748-A6EE-F1A261CBAD0B","BBAFB862-93AE-4F89-BCFF-9F1C67B7FE4C","7EC17E78-593A-4CC8-B7E3-859BCBBFE785","BD8BECDB-A9A1-4009-B433-C925F0AFCCFC","F2677A9D-5855-4DF2-B248-94545B34B762","D52188B3-7DC0-410E-96B1-50892AC00A37"],"partTests":{"__isSmartRef__":true,"id":46},"_ClipMode":"visible","moved":true,"owner":{"__isSmartRef__":true,"id":0},"layout":{"__isSmartRef__":true,"id":51},"isInLayoutCycle":false,"maxVoteValue":5,"connections":{"__isSmartRef__":true,"id":53},"voteValue":2,"attributeConnections":[{"__isSmartRef__":true,"id":55}],"doNotSerialize":["$$voteValue"],"doNotCopyProperties":["$$voteValue"],"isBeingDragged":false,"_Rotation":0,"_Scale":1,"draggingEnabled":false,"grabbingEnabled":false,"__serializedExpressions__":["_Position","distanceToDragEvent","emptyImageURL","fullImageURL"],"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":57},"__LivelyClassName__":"lively.morphic.Box","__SourceModuleName__":"Global.lively.morphic.Core","_Position":"lively.pt(23.5,108.0)","distanceToDragEvent":"lively.pt(94.0,-4.0)","emptyImageURL":"URL.create(\"http://lively-web.org/core/media/star_empty_small.png\")","fullImageURL":"URL.create(\"http://lively-web.org/core/media/star_full_small.png\")"},"6":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":7},"_ClipMode":"visible","derivationIds":[],"id":"A53DA84C-52DF-4489-8733-082ED38235BF","droppingEnabled":true,"halosEnabled":true,"owner":{"__isSmartRef__":true,"id":5},"eventHandler":{"__isSmartRef__":true,"id":8},"name":"5","grabbingEnabled":false,"draggingEnabled":false,"eventsAreIgnored":true,"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(115.0,3.0)"},"7":{"_ImageURL":"http://lively-web.org/core/media/star_empty_small.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(25.0,21.0)","_Padding":"lively.rect(0,0,0,0)"},"8":{"morph":{"__isSmartRef__":true,"id":6},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"9":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":10},"_ClipMode":"visible","derivationIds":[],"id":"022375FA-EE96-45F8-9F67-938546F4CEF8","droppingEnabled":true,"halosEnabled":true,"owner":{"__isSmartRef__":true,"id":5},"eventHandler":{"__isSmartRef__":true,"id":11},"name":"4","grabbingEnabled":false,"draggingEnabled":false,"eventsAreIgnored":true,"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(87.0,3.0)"},"10":{"_ImageURL":"http://lively-web.org/core/media/star_empty_small.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(25.0,21.0)","_Padding":"lively.rect(0,0,0,0)"},"11":{"morph":{"__isSmartRef__":true,"id":9},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"12":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":13},"_ClipMode":"visible","derivationIds":[],"id":"9AF34658-5FF2-4948-826E-4FD23569EC73","droppingEnabled":true,"halosEnabled":true,"owner":{"__isSmartRef__":true,"id":5},"eventHandler":{"__isSmartRef__":true,"id":14},"name":"3","grabbingEnabled":false,"draggingEnabled":false,"eventsAreIgnored":true,"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(59.0,3.0)"},"13":{"_ImageURL":"http://lively-web.org/core/media/star_empty_small.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(25.0,21.0)","_Padding":"lively.rect(0,0,0,0)"},"14":{"morph":{"__isSmartRef__":true,"id":12},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"15":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":16},"_ClipMode":"visible","derivationIds":[],"id":"3803CE41-A0EA-43F3-8984-343BB27C29F4","droppingEnabled":true,"halosEnabled":true,"owner":{"__isSmartRef__":true,"id":5},"eventHandler":{"__isSmartRef__":true,"id":17},"name":"2","grabbingEnabled":false,"draggingEnabled":false,"eventsAreIgnored":true,"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(31.0,3.0)"},"16":{"_ImageURL":"http://lively-web.org/core/media/star_full_small.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(25.0,21.0)","_Padding":"lively.rect(0,0,0,0)"},"17":{"morph":{"__isSmartRef__":true,"id":15},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"18":{"submorphs":[],"scripts":[],"shape":{"__isSmartRef__":true,"id":19},"_ClipMode":"visible","derivationIds":[],"id":"3079F2D4-9BA0-4741-9584-11EA4DC7166F","droppingEnabled":true,"halosEnabled":true,"owner":{"__isSmartRef__":true,"id":5},"eventHandler":{"__isSmartRef__":true,"id":20},"name":"1","grabbingEnabled":false,"draggingEnabled":false,"eventsAreIgnored":true,"doNotSerialize":["_renderContext","halos","_isRendered","priorExtent","cachedBounds","magnets","_whenLoadedCallbacks"],"__serializedExpressions__":["_Position"],"__LivelyClassName__":"lively.morphic.Image","__SourceModuleName__":"Global.lively.morphic.Widgets","_Position":"lively.pt(3.0,3.0)"},"19":{"_ImageURL":"http://lively-web.org/core/media/star_full_small.png","_BorderWidth":0,"_BorderColor":null,"_Fill":null,"isLoaded":true,"__serializedExpressions__":["_Position","_Extent","_Padding"],"__LivelyClassName__":"lively.morphic.Shapes.Image","__SourceModuleName__":"Global.lively.morphic.Shapes","_Position":"lively.pt(0.0,0.0)","_Extent":"lively.pt(25.0,21.0)","_Padding":"lively.rect(0,0,0,0)"},"20":{"morph":{"__isSmartRef__":true,"id":18},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"21":{"_BorderWidth":0,"_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(143.0,27.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(255,255,255)","_Padding":"lively.rect(0,0,0,0)"},"22":{"partsSpaceName":"PartsBin/Widgets/","comment":"A morph to rate using stars.\n\nSet star count: ratingMorph.resetVoteValues(5);\nVote programatically: ratingMorph.vote(3);\nListen for votes: connect(ratingMorph, 'voteValue', target, 'targetAttr');","migrationLevel":9,"partName":"StarRating","changes":[{"__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},{"__isSmartRef__":true,"id":32},{"__isSmartRef__":true,"id":33},{"__isSmartRef__":true,"id":34},{"__isSmartRef__":true,"id":35},{"__isSmartRef__":true,"id":36},{"__isSmartRef__":true,"id":37},{"__isSmartRef__":true,"id":38},{"__isSmartRef__":true,"id":39},{"__isSmartRef__":true,"id":40},{"__isSmartRef__":true,"id":41},{"__isSmartRef__":true,"id":42},{"__isSmartRef__":true,"id":43},{"__isSmartRef__":true,"id":44}],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Tue Dec 16 2014 15:21:40 GMT-0800 (PST)\")"},"23":{"author":"jenslincke","message":"no comment","id":"ADFBF069-513C-4DE6-95A9-8AD4985C6508","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:23:53 GMT-0800 (PST)\")"},"24":{"author":"robertkrahn","message":"no comment","id":"A452871F-4EB9-45D1-94B8-6065CBA7B8FD","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jul 29 2013 23:20:51 GMT-0700 (PDT)\")"},"25":{"author":"SAPLivelyScreen","message":"no comment","id":"7A44D8CA-6D5F-42A3-A4B4-4D7F51EECA52","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jun 18 2013 11:49:27 GMT-0700 (PDT)\")"},"26":{"author":"SAPLivelyScreen","message":"no comment","id":"EF145198-0649-41BD-A92E-521D98FEC49D","__serializedExpressions__":["date"],"date":"new Date(\"Wed May 29 2013 15:36:50 GMT-0700 (PDT)\")"},"27":{"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)\")"},"28":{"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)\")"},"29":{"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205","__serializedExpressions__":["date"],"date":"new Date(\"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)\")"},"30":{"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)\")"},"31":{"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350","__serializedExpressions__":["date"],"date":"new Date(\"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)\")"},"32":{"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)\")"},"33":{"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B","__serializedExpressions__":["date"],"date":"new Date(\"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)\")"},"34":{"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)\")"},"35":{"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:30 GMT-0700 (PDT)\")"},"36":{"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:36 GMT-0700 (PDT)\")"},"37":{"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)\")"},"38":{"author":"robertkrahn","message":"no comment","id":"67FD74CD-7AE4-4050-ADC7-4DF73804258D","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 30 2013 00:18:06 GMT-0700 (PDT)\")"},"39":{"author":"robertkrahn","message":"no comment","id":"FBBB9C99-B61C-4D5F-8750-6E2987DF0C9C","__serializedExpressions__":["date"],"date":"new Date(\"Thu Jun 20 2013 15:16:24 GMT-0700 (PDT)\")"},"40":{"author":"jenslincke","message":"no comment","id":"ECD12BFF-E872-4918-8341-C6571E72F36D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:24:27 GMT-0800 (PST)\")"},"41":{"author":"lauritz","message":"dropping enabled for the blue rectangle","id":"81D350CB-D926-491F-8FF3-A6C9C831BDF2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 12 2014 07:00:28 GMT-0700 (PDT)\")"},"42":{"author":"robertkrahn","message":"no comment","id":"5AF36E70-7428-4762-9423-D7160E3DCBDC","__serializedExpressions__":["date"],"date":"new Date(\"Sat Nov 08 2014 15:34:45 GMT-0800 (PST)\")"},"43":{"author":"robertkrahn","message":"no comment","id":"D40AFCB0-310F-40F5-BA68-F3AAF9DE3CBA","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 16 2014 15:20:48 GMT-0800 (PST)\")"},"44":{"author":"robertkrahn","message":"no comment","id":"62D62B94-BD82-4CD0-8724-F6C78FA61DA8","__serializedExpressions__":["date"],"date":"new Date(\"Tue Dec 16 2014 15:21:40 GMT-0800 (PST)\")"},"45":{"morph":{"__isSmartRef__":true,"id":5},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"46":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":47}},"47":{"test01IsMorph":{"__isSmartRef__":true,"id":48}},"48":{"varMapping":{"__isSmartRef__":true,"id":49},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":50},"__LivelyClassName__":"lively.Closure"},"49":{"this":{"__isSmartRef__":true,"id":46}},"50":{},"51":{"layouter":{"__isSmartRef__":true,"id":52},"centeredHorizontal":true,"__serializedExpressions__":["extentWithoutPlaceholder"],"extentWithoutPlaceholder":"lively.pt(170.0,90.0)"},"52":{"borderSize":3,"defaultBorderSize":10,"spacing":3,"defaultSpacing":15,"container":{"__isSmartRef__":true,"id":5},"__LivelyClassName__":"lively.morphic.Layout.HorizontalLayout","__SourceModuleName__":"Global.lively.morphic.Layout"},"53":{"voteValue":{"__isSmartRef__":true,"id":54}},"54":{},"55":{"sourceObj":{"__isSmartRef__":true,"id":5},"sourceAttrName":"voteValue","targetObj":{"__isSmartRef__":true,"id":5},"targetMethodName":"vote","varMapping":{"__isSmartRef__":true,"id":56},"__LivelyClassName__":"AttributeConnection","__SourceModuleName__":"Global.lively.bindings.Core"},"56":{"source":{"__isSmartRef__":true,"id":5},"target":{"__isSmartRef__":true,"id":5}},"57":{"reset":{"__isSmartRef__":true,"id":58},"vote":{"__isSmartRef__":true,"id":61},"resetVoteValues":{"__isSmartRef__":true,"id":64},"onMouseUp":{"__isSmartRef__":true,"id":67}},"58":{"varMapping":{"__isSmartRef__":true,"id":59},"source":"function reset() {\n  this.emptyImageURL = Global.URL.root.withFilename(\"core/media/star_empty_small.png\");\n  this.fullImageURL = Global.URL.root.withFilename(\"core/media/star_full_small.png\");\n\n  this.resetVoteValues(5);\n  \n  this.connections = {voteValue: {}};\n  lively.bindings.connect(this, 'voteValue', this, 'vote', {\n    updater: function($upd, val) { lively.bindings.noUpdate(function() { $upd(val); }); },\n  });\n}","funcProperties":{"__isSmartRef__":true,"id":60},"__LivelyClassName__":"lively.Closure"},"59":{"this":{"__isSmartRef__":true,"id":5}},"60":{"user":"robertkrahn","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Dec 16 2014 14:44:56 GMT-0800 (PST)\")"},"61":{"varMapping":{"__isSmartRef__":true,"id":62},"source":"function vote(voteInput) {\n  // this.vote(2);\n  // this.voteValue = 3;\n\n  var n = 0;\n  if (typeof voteInput === \"object\") n = Number(voteInput.name)\n  else if (typeof voteInput === \"string\") n = Number(voteInput)\n  else n = voteInput;\n\n\n  n = Math.max(0,Math.min(n, 5))\n  // show(n);\n  \n  // don't signal \"voteValue\" twice:\n  lively.bindings.noUpdate({\n    sourceObj: this, sourceAttribute: 'voteValue',\n    targetObj: this, targetAttribute: \"vote\"},\n    function() {this.voteValue = n;}.bind(this));\n\n  var partition = this.submorphs.partition(function(ea) { return Number(ea.name) <= n; });\n\n  partition[0].invoke(\"setImageURL\", this.fullImageURL);\n  partition[1].invoke(\"setImageURL\", this.emptyImageURL);\n\n}","funcProperties":{"__isSmartRef__":true,"id":63},"__LivelyClassName__":"lively.Closure"},"62":{"this":{"__isSmartRef__":true,"id":5}},"63":{"user":"robertkrahn","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Dec 16 2014 15:21:35 GMT-0800 (PST)\")"},"64":{"varMapping":{"__isSmartRef__":true,"id":65},"source":"function resetVoteValues(maxVoteCount, thenDo) {\n  // this.resetVoteValues(5);\n  this.voteValue = 0;\n  var n = this.maxVoteValue = maxVoteCount || 5;\n\n  this.removeAllMorphs()\n  \n  Array.range(1,n).forEach(function(i) {\n    var m = this.addMorph(lively.morphic.Image.fromURL(this.emptyImageURL));\n    m.name = n-i+1 + \"\" \n    m.disableGrabbing()\n    m.disableDragging()\n    m.ignoreEvents()\n  }, this);\n\n  this.setLayouter({type: \"horizontal\", border: 0, spacing: 0});\n\n  var self= this;\n  this.submorphs[0].whenLoaded(function() {\n      self.applyLayout();\n      var imageExtent = self.submorphs[0].getNativeExtent();\n      var extent = imageExtent.scaleByPt(pt(self.submorphs.length, 1));\n      self.setExtent(extent);\n  })\n}","funcProperties":{"__isSmartRef__":true,"id":66},"__LivelyClassName__":"lively.Closure"},"65":{"this":{"__isSmartRef__":true,"id":5}},"66":{"user":"robertkrahn","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Dec 16 2014 15:36:47 GMT-0800 (PST)\")"},"67":{"varMapping":{"__isSmartRef__":true,"id":68},"source":"function onMouseUp(evt) {\n  var t = evt.getTargetMorph();\n  \n  if (!this.submorphs.include(t)) return false;\n  if (t.name === \"1\" && evt.getPositionIn(t).x < t.bounds().extent().x/2) t = 0;\n  \n  this.vote(t);\n\n  evt.stop(); return true;\n}","funcProperties":{"__isSmartRef__":true,"id":73},"__LivelyClassName__":"lively.Closure"},"68":{"this":{"__isSmartRef__":true,"id":5},"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":69}},"69":{"$super":{"__isSmartRef__":true,"id":70}},"70":{"varMapping":{"__isSmartRef__":true,"id":71},"source":"function () {\n        try {\n          // FIXME super is supposed to be static\n          return Object.getPrototypeOf(obj)[name].apply(obj, arguments);\n        } catch (e) {\n          if (typeof $world !== undefined) $world.logError(e, 'Error in $super call')\n          else alert('Error in $super call: ' + e + '\\n' + e.stack);\n          return null;\n        }\n      }","funcProperties":{"__isSmartRef__":true,"id":72},"__LivelyClassName__":"lively.Closure"},"71":{"obj":{"__isSmartRef__":true,"id":5},"name":"onMouseUp"},"72":{},"73":{"user":"robertkrahn","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Dec 16 2014 15:11:54 GMT-0800 (PST)\")"},"74":{"_BorderWidth":0,"_ClipMode":"visible","_BorderRadius":0,"_Opacity":1,"_BorderStyle":"solid","isLoaded":false,"__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(190.0,140.0)","_BorderColor":"Color.rgb(0,0,0)","_Fill":"Color.rgb(255,255,255)","_Padding":"lively.rect(0,0,0,0)"},"75":{"partsSpaceName":"PartsBin/Widgets/","comment":"Combines the StarRating morph with an image","migrationLevel":9,"partName":"ImageVoter","changes":[{"__isSmartRef__":true,"id":76},{"__isSmartRef__":true,"id":77},{"__isSmartRef__":true,"id":78},{"__isSmartRef__":true,"id":79},{"__isSmartRef__":true,"id":80},{"__isSmartRef__":true,"id":81},{"__isSmartRef__":true,"id":82},{"__isSmartRef__":true,"id":83},{"__isSmartRef__":true,"id":84},{"__isSmartRef__":true,"id":85},{"__isSmartRef__":true,"id":86},{"__isSmartRef__":true,"id":87},{"__isSmartRef__":true,"id":88},{"__isSmartRef__":true,"id":89},{"__isSmartRef__":true,"id":90},{"__isSmartRef__":true,"id":91},{"__isSmartRef__":true,"id":92},{"__isSmartRef__":true,"id":93},{"__isSmartRef__":true,"id":94},{"__isSmartRef__":true,"id":95},{"__isSmartRef__":true,"id":96}],"__serializedExpressions__":["lastModifiedDate"],"__LivelyClassName__":"lively.PartsBin.PartsBinMetaInfo","__SourceModuleName__":"Global.lively.PartsBin","lastModifiedDate":"new Date(\"Fri Nov 28 2014 20:28:37 GMT-0800 (PST)\")"},"76":{"author":"jenslincke","message":"no comment","id":"ADFBF069-513C-4DE6-95A9-8AD4985C6508","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:23:53 GMT-0800 (PST)\")"},"77":{"author":"robertkrahn","message":"no comment","id":"A452871F-4EB9-45D1-94B8-6065CBA7B8FD","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jul 29 2013 23:20:51 GMT-0700 (PDT)\")"},"78":{"author":"SAPLivelyScreen","message":"no comment","id":"7A44D8CA-6D5F-42A3-A4B4-4D7F51EECA52","__serializedExpressions__":["date"],"date":"new Date(\"Tue Jun 18 2013 11:49:27 GMT-0700 (PDT)\")"},"79":{"author":"SAPLivelyScreen","message":"no comment","id":"EF145198-0649-41BD-A92E-521D98FEC49D","__serializedExpressions__":["date"],"date":"new Date(\"Wed May 29 2013 15:36:50 GMT-0700 (PDT)\")"},"80":{"author":"jenslincke","message":"added legend","id":"7ADA3049-56C1-4D32-874B-F664A79DDB20","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:47:05 GMT-0800 (PST)\")"},"81":{"author":"jenslincke","message":"no comment","id":"A4B86A7E-A398-4C29-BEE0-4AA045ABABD2","__serializedExpressions__":["date"],"date":"new Date(\"Fri Jan 18 2013 07:42:31 GMT-0800 (PST)\")"},"82":{"author":"jenslincke","message":"I want my blue rectangle back!","id":"5AA9291A-869F-4D36-8095-4721B5A5B205","__serializedExpressions__":["date"],"date":"new Date(\"Thu Nov 22 2012 01:35:51 GMT-0800 (PST)\")"},"83":{"author":"bgnauk","message":"no comment","id":"0124E570-50B7-4CE3-83A1-6E7BA89B5CD8","__serializedExpressions__":["date"],"date":"new Date(\"Mon Jun 18 2012 10:35:08 GMT-0700 (PDT)\")"},"84":{"author":"undefined","message":"suddenly, the rectangle became a CarDemo","id":"B5083AA8-9BAE-48DD-A6B4-FD7DB3998350","__serializedExpressions__":["date"],"date":"new Date(\"Mon Apr 09 2012 04:42:07 GMT-0700 (PDT)\")"},"85":{"author":"undefined","message":"css transitions","id":"1004E0FC-D96B-4F40-B3E0-F514A3FCFFD7","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:42:26 GMT-0700 (PDT)\")"},"86":{"author":"fbo","message":"","id":"BD1C654D-9100-4B66-BC62-B15FF2498B2B","__serializedExpressions__":["date"],"date":"new Date(\"Fri Feb 24 2012 17:59:09 GMT-0800 (PST)\")"},"87":{"author":"undefined","message":"sorry","id":"44B56D2E-9B59-4C67-A305-49A6E10E66C2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 14 2012 02:53:45 GMT-0700 (PDT)\")"},"88":{"author":"undefined","message":"whoopsie","id":"CEA5DCD5-2DB7-40AD-A776-262A7A0666FC","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:30 GMT-0700 (PDT)\")"},"89":{"author":"undefined","message":"whoopsie","id":"3F17A2D2-3C24-424B-B0FA-E43112267D23","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 03 2012 06:51:36 GMT-0700 (PDT)\")"},"90":{"author":"jenslincke","message":"no comment","id":"AEB2F41B-2C88-4BBA-8875-93CD17CBA1C8","__serializedExpressions__":["date"],"date":"new Date(\"Wed Jan 23 2013 03:57:18 GMT-0800 (PST)\")"},"91":{"author":"robertkrahn","message":"no comment","id":"67FD74CD-7AE4-4050-ADC7-4DF73804258D","__serializedExpressions__":["date"],"date":"new Date(\"Thu May 30 2013 00:18:06 GMT-0700 (PDT)\")"},"92":{"author":"robertkrahn","message":"no comment","id":"FBBB9C99-B61C-4D5F-8750-6E2987DF0C9C","__serializedExpressions__":["date"],"date":"new Date(\"Thu Jun 20 2013 15:16:24 GMT-0700 (PDT)\")"},"93":{"author":"jenslincke","message":"no comment","id":"ECD12BFF-E872-4918-8341-C6571E72F36D","__serializedExpressions__":["date"],"date":"new Date(\"Tue Feb 04 2014 01:24:27 GMT-0800 (PST)\")"},"94":{"author":"lauritz","message":"dropping enabled for the blue rectangle","id":"81D350CB-D926-491F-8FF3-A6C9C831BDF2","__serializedExpressions__":["date"],"date":"new Date(\"Wed Mar 12 2014 07:00:28 GMT-0700 (PDT)\")"},"95":{"author":"robertkrahn","message":"no comment","id":"5AF36E70-7428-4762-9423-D7160E3DCBDC","__serializedExpressions__":["date"],"date":"new Date(\"Sat Nov 08 2014 15:34:45 GMT-0800 (PST)\")"},"96":{"__serializedExpressions__":["date"],"author":"robertkrahn","message":"no comment","id":"6E00599C-02C5-446B-96DC-65F4B3171799","date":"new Date(\"Tue Dec 16 2014 21:45:29 GMT-0800 (PST)\")"},"97":{"morph":{"__isSmartRef__":true,"id":0},"__LivelyClassName__":"lively.morphic.EventHandler","__SourceModuleName__":"Global.lively.morphic.Events"},"98":{"__serializedLivelyClosures__":{"__isSmartRef__":true,"id":99}},"99":{"test01IsMorph":{"__isSmartRef__":true,"id":100}},"100":{"varMapping":{"__isSmartRef__":true,"id":101},"source":"function test01IsMorph(aPart) {\n    this.assert(aPart.isMorph, 'rectangle should be a morph');\n}","funcProperties":{"__isSmartRef__":true,"id":102},"__LivelyClassName__":"lively.Closure"},"101":{"this":{"__isSmartRef__":true,"id":98}},"102":{},"103":{},"104":{"loadImageURL":{"__isSmartRef__":true,"id":105}},"105":{"varMapping":{"__isSmartRef__":true,"id":106},"source":"function loadImageURL(url, thenDo) {\n  // this.loadImageURL(\"http://lively-web.org/core/media/cdg-logos/0.png\")\n  // this.loadImageURL(\"http://lively-web.org/core/media/cdg-logos/1.png\")\n\n  var img = this.get(\"Image\"), self = this;\n  img.setImageURL(url, {maxWidth: 150, maxHeight: 100}, function() {\n    self.applyLayout();\n    self.get(\"StarRating\").align(\n      self.get(\"StarRating\").bounds().bottomCenter(),\n      self.innerBounds().bottomCenter().addXY(0,-5))\n    img.align(\n      img.bounds().center(),\n      self.innerBounds().center().addXY(0,-20))\n  });\n  \n  return this;\n}","funcProperties":{"__isSmartRef__":true,"id":107},"__LivelyClassName__":"lively.Closure"},"106":{"this":{"__isSmartRef__":true,"id":0}},"107":{"user":"robertkrahn","__serializedExpressions__":["timestamp"],"timestamp":"new Date(\"Tue Dec 16 2014 17:18:22 GMT-0800 (PST)\")"},"isSimplifiedRegistry":true}}