Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #204 from peitschie/benchmark-fixup
Browse files Browse the repository at this point in the history
Add required member information to benchmark
  • Loading branch information
Jos van den Oever committed Nov 21, 2013
2 parents c5b1bcd + 0a707b9 commit 84d2084
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion programs/benchmark/js/EnterEditMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ define(["BenchmarkAction"], function(BenchmarkAction) {
runtime.loadClass("gui.SessionView");
runtime.loadClass("gui.SelectionViewManager");
runtime.loadClass("gui.ShadowCursor");
runtime.loadClass("ops.OpAddMember");

/**
* Setup and register all components required to start editing the document
Expand Down Expand Up @@ -74,7 +75,8 @@ define(["BenchmarkAction"], function(BenchmarkAction) {
sessionController,
shadowCursor,
selectionViewManager,
caretManager;
caretManager,
addMember = new ops.OpAddMember();

action.start();

Expand All @@ -85,6 +87,17 @@ define(["BenchmarkAction"], function(BenchmarkAction) {
selectionViewManager = new gui.SelectionViewManager();
new gui.SessionView(viewOptions, localMemberId, session, caretManager, selectionViewManager);
selectionViewManager.registerCursor(shadowCursor, true);

addMember.init({
memberid: localMemberId,
setProperties: {
fullName: runtime.tr("Unknown Author"),
color: "black",
imageUrl: "avatar-joe.png"
}
});
session.enqueue([addMember]);

sessionController.startEditing();
sharedState.sessionController = sessionController;

Expand Down

0 comments on commit 84d2084

Please sign in to comment.