refactoring minplot layout

This commit is contained in:
Pablo Luna
2011-03-17 15:51:40 +00:00
parent 7acfd763fa
commit 741ddef314
17 changed files with 278 additions and 181 deletions

View File

@@ -16,13 +16,12 @@
* limitations under the License.
*/
mindplot.DragTopicPositioner = function(workspace, topics)
mindplot.DragTopicPositioner = function(layoutManager)
{
core.assert(workspace, 'workspace can not be null');
core.assert(topics, 'topics can not be null');
this._workspace = workspace;
this._topics = topics;
core.assert(layoutManager, 'layoutManager can not be null');
this._layoutManager = layoutManager;
this._topics = layoutManager.getDesigner()._getTopics();
this._workspace = layoutManager.getDesigner().getWorkSpace();
};
mindplot.DragTopicPositioner.prototype.positionateDragTopic = function(dragTopic)
@@ -38,7 +37,7 @@ mindplot.DragTopicPositioner.prototype.positionateDragTopic = function(dragTopic
if (dragTopic.isConnected())
{
var targetTopic = dragTopic.getConnectedToTopic();
var topicBoard = targetTopic.getTopicBoard();
var topicBoard = this._layoutManager.getTopicBoardForTopic(targetTopic);
topicBoard.positionateDragTopic(dragTopic);
}
};