Lively Kernel canvas
//
10006.917236276694798Wikicontroltrue
DraftFormatingScript40
1.firstitem30
4.forthitem30
3.thirditem30
3.2subitem20
3.1subitem20
2.2subitem20
2.1subitem20
2.seconditem30
//findtitleandiconandnamethemtitleText=WorldMorph.current().submorphs.detect(function(ea){returnea.getFontSize&&(ea.getFontSize()==40)})titleText.name="titleText"logoImage=WorldMorph.current().submorphs.detect(function(ea){returnea.constructor.type=="ImageMorph"})logoImage.name="logoImage"//applystyle$morph("titleText").setPosition(pt(0.0,10.0))$morph("logoImage").setPosition(pt(950.0,15.0))//ItemLayoutConfig.customPageStyle={itemLevel1:{fontSize:30},itemLevel2:{fontSize:20},}PageStyle={isItemLevel1:function(textMorph){returntextMorph.getFontSize()==Config.customPageStyle.itemLevel1.fontSize},isItemLevel2:function(textMorph){returntextMorph.getFontSize()==Config.customPageStyle.itemLevel2.fontSize}}layoutMorphsVerically=function(morphs,topLeft,space,itemIndent){varpos=topLeft||pt(100,100);if(space===undefined)space=20;if(itemIndent===undefined)itemIndent=40;varverticallySortedMorphs=morphs.sort(function(a,b){returna.getPosition().y-b.getPosition().y})verticallySortedMorphs.each(function(ea){//console.log("pos"+pos)if(PageStyle.isItemLevel2(ea))ea.setPosition(pt(pos.x+itemIndent,pos.y));elseea.setPosition(pos);pos=pos.addPt(pt(0,space+ea.shape.bounds().height))})};listItems1and2=WorldMorph.current().submorphs.select(function(ea){varpageStyle=Config.customPageStyle;returnea.getFontSize&&(PageStyle.isItemLevel1(ea)||PageStyle.isItemLevel2(ea))})layoutMorphsVerically(listItems1and2,pt(50,100),5,40)WorldMorph.current().setDisplayTheme(WorldMorph.current().displayThemes['hpi'])//shrinktheworldtodemosizebasicResize(this.world(),this.world().canvas(),1024,768);this.world().setBorderColor(Color.black);this.world().setBorderWidth(0.25)39truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null61