Merge branch 'master' into wise-org-pela

This commit is contained in:
Paulo Gustavo Veiga 2011-06-28 01:21:23 -03:00
commit 57e93936f7
9 changed files with 40 additions and 34 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jhlabs</groupId>
<artifactId>imaging</artifactId>
<version>01012005</version>
</project>

View File

@ -1,14 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
<name>Java Transaction API</name>
<description>
The javax.transaction package. It is appropriate for inclusion in a classpath, and may be added to a Java 2 installation.
</description>
<url>http://java.sun.com/products/jta</url>
<distributionManagement>
<downloadUrl>http://java.sun.com/products/jta</downloadUrl>
</distributionManagement>
</project>

View File

@ -36,7 +36,8 @@ mindplot.DragPivot.prototype.getTargetTopic = function()
mindplot.DragPivot.prototype._buildStraightLine = function()
{
var line = new web2d.Line();
var line = new web2d.CurvedLine();
line.setStyle(web2d.CurvedLine.SIMPLE_LINE);
line.setStroke(1, 'solid', '#CC0033');
line.setOpacity(0.4);
line.setVisibility(false);
@ -45,7 +46,8 @@ mindplot.DragPivot.prototype._buildStraightLine = function()
mindplot.DragPivot.prototype._buildCurvedLine = function()
{
var line = new web2d.PolyLine();
var line = new web2d.CurvedLine();
line.setStyle(web2d.CurvedLine.SIMPLE_LINE);
line.setStroke(1, 'solid', '#CC0033');
line.setOpacity(0.4);
line.setVisibility(false);

View File

@ -42,7 +42,7 @@ mindplot.DragTopicPositioner.prototype.positionateDragTopic = function(dragTopic
}
};
mindplot.DragTopicPositioner.CENTRAL_TO_MAINTOPIC_MAX_HORIZONTAL_DISTANCE = 300;
mindplot.DragTopicPositioner.CENTRAL_TO_MAINTOPIC_MAX_HORIZONTAL_DISTANCE = 400;
mindplot.DragTopicPositioner.prototype._checkDragTopicConnection = function(dragTopic)
{
@ -99,6 +99,7 @@ mindplot.DragTopicPositioner.prototype._lookUpForMainTopicToMainTopicConnection
var result = null;
var clouserDistance = -1;
var draggedNode = dragTopic.getDraggedTopic();
var distance = null;
// Check MainTopic->MainTopic connection...
for (var i = 0; i < topics.length; i++)
@ -110,8 +111,19 @@ mindplot.DragTopicPositioner.prototype._lookUpForMainTopicToMainTopicConnection
var canBeConnected = dragTopic.canBeConnectedTo(targetTopic);
if (canBeConnected)
{
result = targetTopic;
break;
var targetPosition = targetTopic.getPosition();
var fix = position.y>targetPosition.y;
var gap = 0;
if(targetTopic._getChildren().length>0){
gap = Math.abs(targetPosition.y - targetTopic._getChildren()[0].getPosition().y)
}
var yDistance = Math.abs(position.y -fix*gap - targetPosition.y);
if(distance==null || yDistance<distance)
{
result = targetTopic;
distance = yDistance;
}
}
}
}

View File

@ -305,8 +305,12 @@ mindplot.NodeModel.prototype.canBeConnected = function(sourceModel, sourcePositi
// Finally, check current node ubication.
var targetTopicSize = targetModel.getSize();
var yDistance = Math.abs(sourcePosition.y - targetPosition.y);
var gap = 35 + targetTopicHeight / 2;
if(targetModel.getChildren().length>0){
gap += Math.abs(targetPosition.y - targetModel.getChildren()[0].getPosition().y);
}
if (yDistance <= 5 + targetTopicHeight / 2)
if (yDistance <= gap)
{
// Circular connection ?
if (!sourceModel._isChildNode(this))
@ -339,7 +343,7 @@ mindplot.NodeModel.prototype.canBeConnected = function(sourceModel, sourcePositi
return result;
};
mindplot.NodeModel.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE = 60;
mindplot.NodeModel.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE = 220;
mindplot.NodeModel.prototype._isChildNode = function(node)
{

View File

@ -13,12 +13,20 @@
</parent>
<repositories>
<repository>
<layout>legacy</layout>
<id>local-dependecies</id>
<name>local-dependecies</name>
<url>file://${basedir}/../libraries</url>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>maven2-repository.jahia.org</id>
<name>Jahia Repository for Maven</name>
<url>http://maven.jahia.org/maven2/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
@ -89,12 +97,12 @@
<version>1.0.1B</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- <dependency>
<groupId>com.jhlabs</groupId>
<artifactId>imaging</artifactId>
<version>01012005</version>
<scope>compile</scope>
</dependency>
</dependency> -->
<dependency>
<groupId>com.octo.captcha</groupId>
<artifactId>jcaptcha</artifactId>