// only move the selection if the update succeeded, otherwise the editor
// will stay open
if (committed) {
switch (direction) {
case LEFT:
this.layer.doCommand(new MoveSelectionCommand(
MoveDirectionEnum.LEFT, false, false));
break;
case UP:
this.layer.doCommand(new MoveSelectionCommand(
MoveDirectionEnum.UP, false, false));
break;
case RIGHT:
this.layer.doCommand(new MoveSelectionCommand(
MoveDirectionEnum.RIGHT, false, false));
break;
case DOWN:
this.layer.doCommand(new MoveSelectionCommand(
MoveDirectionEnum.DOWN, false, false));
break;
}
}