- Exclude brix during export

- More changes for layout manager.
This commit is contained in:
Paulo Veiga 2011-12-31 14:52:13 -03:00
parent d9d89a24de
commit 8062a29323
8 changed files with 20 additions and 20 deletions

1
core-js/pepe.txy Normal file
View File

@ -0,0 +1 @@
s

View File

@ -17,7 +17,7 @@ mvn clean
# Prepare copy
mkdir -p ${TMP_DIR}
rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR}
rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "**/*/Brix*" --exclude "**/brix" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR}
# Zip file
[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR}

View File

@ -68,7 +68,6 @@
<filelist dir="${basedir}/src/main/javascript/" files="model/NodeModel.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="model/RelationshipModel.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="ActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="BrixActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="StandaloneActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="DesignerModel.js"/>
@ -190,14 +189,6 @@
files="collaboration/framework/AbstractCollaborativeFramework.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="collaboration/framework/AbstractCollaborativeModelFactory.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="collaboration/framework/brix/model/NodeModel.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="collaboration/framework/brix/model/Mindmap.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="collaboration/framework/brix/BrixCollaborativeModelFactory.js"/>
<filelist dir="${basedir}/src/main/javascript/"
files="collaboration/framework/brix/BrixFramework.js"/>
<filelist dir="${basedir}/src/main/javascript/widget/" files="ToolbarNotifier.js"/>
<filelist dir="${basedir}/src/main/javascript/widget/" files="ToolbarItem.js"/>
<filelist dir="${basedir}/src/main/javascript/widget/" files="ToolbarPaneItem.js"/>

View File

@ -90,7 +90,7 @@ mindplot.BubbleTip = new Class({
}.bind(this)}).start(0, 100);
}
},
updatePosition : function(event) {
updateBranchPosition : function(event) {
this._evt = new Event(event);
},
close : function(event) {

View File

@ -103,6 +103,7 @@ mindplot.layout.BaseLayoutManager = new Class({
var type = node.getModel().getType();
return type == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE;
},
getClassName:function() {
return mindplot.layout.BaseLayoutManager.NAME;
}

View File

@ -31,7 +31,7 @@ mindplot.nlayout.OriginalLayout = new Class({
disconnectNode: function(nodeId) {
var node = this._treeSet.find(nodeId);
$assert(this._treeSet.getParent(node),"Node already disconnected");
$assert(this._treeSet.getParent(node), "Node already disconnected");
// Remove from children list.
var sorter = node.getSorter();
@ -42,7 +42,6 @@ mindplot.nlayout.OriginalLayout = new Class({
// Fire a basic validation ...
sorter.verify(this._treeSet, node);
},
layout: function() {
@ -79,7 +78,12 @@ mindplot.nlayout.OriginalLayout = new Class({
children.forEach(function(child) {
var offset = offsetById[child.getId()];
var newPos = {x:parentPosition.x + offset.x,y:parentPosition.y + offset.y};
var parentX = parentPosition.x;
var parentY = parentPosition.y;
var verticalOffset = (node.getSize().height / 2);
var newPos = {x:parentX + offset.x,y:parentY + offset.y + verticalOffset};
this._treeSet.updateBranchPosition(child, newPos);
}.bind(this));

View File

@ -10,7 +10,6 @@ mindplot.nlayout.SymetricSorder = new Class({
return result;
},
_computeChildrenHeight : function(treeSet, node, heightCache) {
var height = node.getSize().height + (mindplot.nlayout.SymetricSorder.INTERNODE_VERTICAL_PADDING * 2); // 2* Top and down padding;
@ -39,13 +38,13 @@ mindplot.nlayout.SymetricSorder = new Class({
// No children...
var children = graph.getChildren(parent);
if (children.length == 0) {
return [0,parent.getPosition()];
return [0,parent.getPosition()]; // @Todo:Change x ...
}
// Try to fit within ...
//
// - Order is change if the position top position is changed ...
// - Suggested position is the middle bitween the two topics...
// - Suggested position is the middle between the two topics...
//
var result = null;
children.forEach(function(child) {
@ -67,6 +66,7 @@ mindplot.nlayout.SymetricSorder = new Class({
insert: function(treeSet, parent, child, order) {
var children = this._getSortedChildren(treeSet, parent);
$assert(order <= children.length, "Order must be continues and can not have holes. Order:" + order);
$assert(order <= children.length, "Order must be continues and can not have holes. Order:" + order);
// Shift all the elements in one .
for (var i = order; i < children.length; i++) {
@ -117,7 +117,7 @@ mindplot.nlayout.SymetricSorder = new Class({
// Compute heights ...
var heights = children.map(function(child) {
return {id:child.getId(),height:this._computeChildrenHeight(treeSet, child)};
}.bind(this));
}, this);
// Compute the center of the branch ...
var totalHeight = 0;

View File

@ -16,7 +16,10 @@ mindplot.nlayout.TestSuite = new Class({
var manager = new mindplot.nlayout.LayoutManager(0, size);
manager.addNode(1, size, position);
manager.addNode(2, size, position);
manager.connectNode(0, 1, 0);
manager.connectNode(0, 2, 0);
manager.layout();
manager.dump();