Lively Kernel canvas
//
10009.971865014527904Wikicontroltrue
RunTestfalsenull>' + result.selector;\n\t\t\tmsg += '\\n';\n\t\t\tmsg += result.err.message;\n\t\t\treturn msg;\n\t\t}).join('\\n---------\\n');\n\t\t$morph('testResult').setExtent(pt(400,20))\n\t\t$morph('testResult').setFill(Color.red);\n\t\t$morph('testResult').setTextString(failStr);\n\t} /* runFinished */"]]>falsenull
Global
1475
Draft(Re-)layoutMorphs40
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:340HorizontalLayoutTest2falsetruefalse0
AlltestsofAsyncTestCasedonefalsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
RunningVerticalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
VerticalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
RunningVerticalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
VerticalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:342HorizontalLayoutTest2falsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:281HorizontalLayoutTest2falsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:281HorizontalLayoutTest2falsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:342HorizontalLayoutTest2falsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
Testsrun:2--Testsfailed:0--Failedtests:--TestCasestimeToRuns:280HorizontalLayoutTest2falsetruefalse0
AlltestsofAsyncTestCasedonefalsetruefalse0
RunningHorizontalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
RunningHorizontalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
HorizontalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
RunningVerticalLayoutTest>>testLayoutBeforeAddMorph>testLayoutBeforeAddMorph"]]>falsetruefalse0
VerticalLayoutTest>>testLayoutBeforeAddMorphdone>testLayoutBeforeAddMorph done"]]>falsetruefalse0
RunningVerticalLayoutTest>>testLayout>testLayout"]]>falsetruefalse0
VerticalLayoutTest>>testLayoutdone>testLayout done"]]>falsetruefalse0
charboundsisnullfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([[0,0,2000,1200]])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/draft/DraftRelayoutMorphs.xhtmlfalsetruefalse0
problemstoparsehttp://lively-kernel.org/repository/webwerkstatt/draft/DraftRelayoutMorphs.xhtmlfalsetruefalse0
extendForSerializationundefinedfalsetruefalse0867
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayoutBeforeAddMorph"]]>
- >testLayoutBeforeAddMorph done"]]>
- >testLayout"]]>
- >testLayout done"]]>
-1nullnulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
truetrue100falsetrue
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
TestCase.subclass("HorizontalLayoutTest",{setUp:function(){},createTestMorph:function(name){if($morph(name))$morph(name).remove();this.morph=newBoxMorph(newRectangle(0,0,300,100));this.morph.layoutManager=newHorizontalLayout();this.morph.name=name;this.morph.setFill(Color.gray);this.morph.openInWorld();returnthis.morph;},testLayoutBeforeAddMorph:function(){varm=this.createTestMorph("HorizontalLayoutTest_M1");vars1=Morph.makeRectangle(newRectangle(0,0,50,50));vars2=Morph.makeRectangle(newRectangle(0,0,50,50));vars3=Morph.makeRectangle(newRectangle(0,0,50,50));m.addMorph(s1);m.addMorph(s2);m.addMorph(s3);this.assertEqualState(s1.getPosition(),pt(0.5,0.5),"s1bad");this.assertEqualState(s2.getPosition(),pt(51.5,0.5),"s2bad");this.assertEqualState(s3.getPosition(),pt(102.5,0.5),"s3bad");},testLayout:function(){varm=this.createTestMorph("HorizontalLayoutTest_M2");vars1=Morph.makeRectangle(newRectangle(0,0,50,50));vars2=Morph.makeRectangle(newRectangle(0,0,50,50));vars3=Morph.makeRectangle(newRectangle(0,0,50,50));m.addMorph(s1);m.addMorph(s2);m.addMorph(s3);s2.remove();m.layoutManager.layout(m);this.assertEqualState(s1.getPosition(),pt(0.5,0.5),"s1bad");this.assertEqualState(s3.getPosition(),pt(51.5,0.5),"s3bad");},tearDown:function(){if(this._errorOccured){//letitstayopen}else{this.morph.remove()}},})TestCase.subclass("VerticalLayoutTest",{setUp:function(){},createTestMorph:function(name){if($morph(name))$morph(name).remove();this.morph=newBoxMorph(newRectangle(0,0,300,100));this.morph.layoutManager=newVerticalLayout();this.morph.name=name;this.morph.setFill(Color.gray);//this.morph.openInWorld();returnthis.morph;},testLayoutBeforeAddMorph:function(){varm=this.createTestMorph("VerticalLayoutTest_M1");vars1=Morph.makeRectangle(newRectangle(0,0,50,50));vars2=Morph.makeRectangle(newRectangle(0,0,50,50));vars3=Morph.makeRectangle(newRectangle(0,0,50,50));m.addMorph(s1);m.addMorph(s2);m.addMorph(s3);this.assertEqualState(s1.getPosition(),pt(0.5,0.5),"s1bad");this.assertEqualState(s2.getPosition(),pt(0.5,51.5),"s2bad");this.assertEqualState(s3.getPosition(),pt(0.5,102.5),"s3bad");},testLayout:function(){varm=this.createTestMorph("VerticalLayoutTest_M2");vars1=Morph.makeRectangle(newRectangle(0,0,50,50));vars2=Morph.makeRectangle(newRectangle(0,0,50,50));vars3=Morph.makeRectangle(newRectangle(0,0,50,50));m.addMorph(s1);m.addMorph(s2);m.addMorph(s3);s2.remove();m.layoutManager.layout(m);this.assertEqualState(s1.getPosition(),pt(0.5,0.5),"s1bad");this.assertEqualState(s3.getPosition(),pt(0.5,51.5),"s3bad");},tearDown:function(){if(this._errorOccured){//letitstayopen}else{this.morph.remove()}},})$morph('runTest').doAction()7truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Morph.addMethods({topSubmorph:function(){//themorphontopisthelastoneinthelistreturnthis.visibleSubmorphs().last();},visibleSubmorphs:function(){returnthis.submorphs.reject(function(ea){returneainstanceofSchedulableAction})},relayout:function(){if(this.layoutManager){this.layoutManager.layout(this)}},})LayoutManager.subclass('HorizontalLayout',{//alignmentmorethananythingbeforeAddMorph:function(supermorph,submorph,isFront){if(submorph.isEpimorph)return;//runsbeforesubmorphisaddedvardx=this.leftMarginOf(submorph);vardy;varlast=supermorph.topSubmorph();if(!last){dx+=this.leftPaddingOf(supermorph);dy=this.topPaddingOf(supermorph);submorph.align(submorph.bounds().topLeft(),pt(dx,dy));}else{dx+=this.rightMarginOf(last);dy=0;submorph.align(submorph.bounds().topLeft(),last.bounds().topRight());submorph.translateBy(pt(dx,dy));}},layout:function(supermorph){varx=this.leftPaddingOf(supermorph);vary=this.topPaddingOf(supermorph);varsubmorphs=supermorph.visibleSubmorphs();for(vari=0;i<submorphs.length;i++){varsubmorph=submorphs[i];x+=this.leftMarginOf(submorph)submorph.align(submorph.bounds().topLeft(),pt(x,y));x+=submorph.bounds().width;x+=this.rightMarginOf(submorph);}},});LayoutManager.subclass('VerticalLayout',{//alignmentmorethananythingbeforeAddMorph:function(supermorph,submorph,isFront){if(submorph.isEpimorph)return;//runsbeforesubmorphisaddedvardx;vardy=this.topMarginOf(submorph);varlast=supermorph.topSubmorph();if(!last){dx=this.leftPaddingOf(supermorph);dy+=this.topPaddingOf(supermorph);submorph.align(submorph.bounds().topLeft(),pt(dx,dy));}else{dx=0;dy+=this.bottomMarginOf(last);submorph.align(submorph.bounds().topLeft(),last.bounds().bottomLeft());//submorph.translateBy(pt(dx,dy));}},layout:function(supermorph){varx=this.leftPaddingOf(supermorph);vary=this.topPaddingOf(supermorph);varsubmorphs=supermorph.visibleSubmorphs();for(vari=0;i<submorphs.length;i++){varsubmorph=submorphs[i];y+=this.topMarginOf(submorph)submorph.align(submorph.bounds().topLeft(),pt(x,y));y+=submorph.bounds().width;y+=this.bottomMarginOf(submorph);}},});LayoutManager.subclass('VerticalLayout',{//alignmentmorethananythingbeforeAddMorph:function(supermorph,submorph,isFront){if(submorph.isEpimorph)return;//runsbeforesubmorphisaddedvardx;vardy=this.topMarginOf(submorph);varlast=supermorph.topSubmorph();if(!last){dx=this.leftPaddingOf(supermorph);dy+=this.topPaddingOf(supermorph);submorph.align(submorph.bounds().topLeft(),pt(dx,dy));}else{dx=0;dy+=this.bottomMarginOf(last);submorph.align(submorph.bounds().topLeft(),last.bounds().bottomLeft());//submorph.translateBy(pt(dx,dy));}},});truetruefalsetrue6truetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null75