Lively Kernel canvas
// this script is evaluated on world load
MyConsole = WorldMorph.current().submorphs.detect(function(ea){return ea.name == "MyConsole"});
if(!MyConsole) return;
MyConsole = MyConsole.component;
MyConsole.setText("-- start --");
MyConsole.log = function(s) {
this.setText(this.formalModel.getText() + "\n" + s);
};
MyConsole.log("My Console initialized!");
MyConsole.morph.resetScrollPane = function() {
var sp = this.enclosingScrollPane();
if (sp) sp.scrollToBottom();
};
// console.consumers seems to be broken... so we go the hard waz
console.log = console.log.wrap(function(proceed, s) {
MyConsole.log(s)
proceed(s)})
console.log("wrapped console for MyConsole successfully")
ContextJSMarkerMorph40false
10000.004222173238187209Wikicontroltrue
null-1.1789723903343772nullfalse
true
null-1.6282923629970134nullfalse
true
PlainRecord16null
false
Model16
Record16
false
-----falsetruefalse0
worldis1:WorldMorph([0,0,2000,1000])falsetruefalse0
Errorevaluatinginitializer:SyntaxError:Invalidreturnstatement.falsetruefalse0
startingWikiNavigatorfalsetruefalse0
status207onPROPFINDhttp://lively-kernel.org/repository/webwerkstatt/ContextJSMarkerMorph.xhtmlfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/anonymous_module_2loadedin29msfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/anonymous_module_1loadedin514msfalsetruefalse0
fontHelvetica40:spacewidth11from51xWidth20falsetruefalse0
fontHelvetica16:spacewidth4from20xWidth8falsetruefalse0
ResizingSVGcanvasfalsetruefalse0
Moduleloadcheckdone.28modulesloaded.falsetruefalse0
-------------------------------------------falsetruefalse0
invoke62446:TextMorph([0,0,148,28.266666412353516])falsetruefalse0
fontCourier12:spacewidth7from21xWidth7falsetruefalse0
fontCourier12:spacewidth7from21xWidth7falsetruefalse0
-------------------------------------------falsetruefalse0
invoke62621:TextMorph([0,0,156,28.266666412353516])falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,2000,1000])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/ContextJSMarkerMorph.xhtml?1263817736017falsetruefalse0
extendForSerializationundefinedfalsetruefalse0
status204onPUThttp://lively-kernel.org/repository/webwerkstatt/ContextJSMarkerMorph.xhtmlfalsetruefalse0
successpublishingworldathttp://lively-kernel.org/repository/webwerkstatt/ContextJSMarkerMorph.xhtml,status204falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,2000,1000])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/ContextJSMarkerMorph.xhtml?1263817736017falsetruefalse0
extendForSerializationundefinedfalsetruefalse0814-1nulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
truetrue100false
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null
null-1.0945893717548698nullfalse
true
null-1.373033800094254nullfalse
true
null-1.5909008546209855nullfalse
true
null-1.6144155839462853nullfalse
true
nulltrue
null-1.8408219429397574nullfalse
true
Stage1:UseMorphsinaspecialway-identifysomeproblems(clickanddraganddropbehavior)161null
Stage3:Refactoritintoaproperclass16null
NodeRecord16null
false
deprecated
View16
Model16
deprecatedfalse
Stage2:PrototyopebehaviorwithLayers16null
Model16
10000.15009463529699996Wikicontroltrue
10000.00002261939301589345Wikicontroltrue
10000.00037122101507129315Wikicontroltrue
createLayer("MarkerMorphLayer");layerClass(NodeMorphLayer,Morph,{getisPropertyOnIgnoreList(proceed,prop){if(prop=="delayUpdateConnectors")returntrue;returnproceed(prop)},})Morph.prototype.becomeMarker=function(){varlayers=this.getWithLayers()||[];if(!layers.include(MarkerMorphLayer)){layers.push(MarkerMorphLayer)this.setWithLayers(layers)}}/**ExperimentwithaLayeroverMorphs:*AMorphthatcanactasMarker**/layerClass(MarkerMorphLayer,Morph,{getopenForDragAndDrop(){returnfalse;},containsPoint:function(proceed,point){varresult=proceed(point)if(result){varinnerRect=this.shape.bounds().insetBy(5);return!innerRect.containsPoint(this.localize(point));}else{returnfalse;}}});/***RefactorResultsintoanewClass:*-change"proceed"to"$super"*-createintializecode*-movegettertoprototypebehavior*/Morph.subclass("MarkerMorph",{openForDragAndDrop:false,initialize:function($super,rectangle){$super(newlively.scene.Rectangle(rectangle))this.applyStyle({borderWidth:2,borderColor:Color.rgb(223,70,0),fill:null});this.shape.setStrokeDashArray(String([9,7]));},containsPoint:function($super,point){varresult=$super(point)if(result){varinnerRect=this.shape.bounds().insetBy(5);return!innerRect.containsPoint(this.localize(point));}else{returnfalse;}}});//m=newMarkerMorph(newRectangle(0,0,100,100));WorldMorph.current().addMorph(m);truetruefalse75truetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
MarkerMorphfalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
10008.162765593091008Wikicontroltrue
WorldMorph16
- null
false
Widget16
false
SVGNode16null
false
Node16
- null
false
Wrapper16
false
Shape16
- null
false
PasteUpMorph16
- null
false
Morph16
falsenull48