Remove layout harcodes.

This commit is contained in:
Paulo Veiga
2012-01-30 20:17:47 -03:00
parent 306133cd5e
commit 00ca42f7fe
8 changed files with 29 additions and 188 deletions

View File

@@ -17,10 +17,13 @@
*/
mindplot.DragManager = new Class({
initialize:function(workspace) {
initialize:function(workspace, eventDispatcher) {
this._workspace = workspace;
this._designerModel = workspace;
this._listeners = {};
this._isDragInProcess = false;
this._eventDispatcher = eventDispatcher;
mindplot.DragTopic.init(this._workspace);
},
add : function(node) {
@@ -35,7 +38,8 @@ mindplot.DragManager = new Class({
workspace.enableWorkspaceEvents(false);
// Set initial position.
var dragNode = node.createDragNode();
var layoutManager = this._eventDispatcher.getLayoutManager();
var dragNode = node.createDragNode(layoutManager);
// Register mouse move listener ...
var mouseMoveListener = dragManager._buildMouseMoveListener(workspace, dragNode, dragManager);