var m = $morph('BigMorph'),
point1 = m.worldPoint(m.innerBounds().center().withY(5)),
point2 = m.submorphs[1].worldPoint(
m.submorphs[1].innerBounds().center().addXY(15, -15));
Benchmarks = {
"halos and menus": {
"show and remove halo items": function() {
m.showHalos();
m.removeHalos();
},
"open and close morph menu": function() {
var openEvt = lively.morphic.EventSimulator.createMouseEvent(
'mousedown', point1, 2, []);
m.showMorphMenu(openEvt);
var closeEvt = lively.morphic.EventSimulator.createMouseEvent(
'mousedown', pt(0,0), 0, []);
$world.hands[0].removeOpenMenu(closeEvt);
}
},
"bounds": {
"bounds()": function() {
return m.withAllSubmorphsDo(function(ea) { return ea.bounds() });