Migration completed.

This commit is contained in:
Paulo Veiga
2011-07-28 14:07:01 -03:00
parent 899bf85545
commit 361892e004
4 changed files with 1691 additions and 1937 deletions

View File

@@ -1,122 +1,106 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
mindplot.CentralTopic = function(model)
{
$assert(model, "Model can not be null");
this.setModel(model);
mindplot.CentralTopic.superClass.initialize.call(this);
this.__onLoad = true;
};
mindplot.CentralTopic = new Class({
objects.extend(mindplot.CentralTopic, mindplot.Topic);
Extends:mindplot.Topic,
initialize: function(model) {
this.parent(model);
},
workoutIncomingConnectionPoint : function(sourcePosition) {
return this.getPosition();
},
mindplot.CentralTopic.prototype.workoutIncomingConnectionPoint = function(sourcePosition)
{
return this.getPosition();
};
getTopicType : function() {
return mindplot.NodeModel.CENTRAL_TOPIC_TYPE;
},
mindplot.CentralTopic.prototype.getTopicType = function()
{
return mindplot.NodeModel.CENTRAL_TOPIC_TYPE;
};
setCursor : function(type) {
type = (type == 'move') ? 'default' : type;
mindplot.Topic.prototype.setCursor.call(this, type);
},
mindplot.CentralTopic.prototype.setCursor = function(type)
{
type = (type == 'move') ? 'default' : type;
mindplot.CentralTopic.superClass.setCursor.call(this, type);
};
isConnectedToCentralTopic : function() {
return false;
},
mindplot.CentralTopic.prototype.isConnectedToCentralTopic = function()
{
return false;
};
createChildModel : function(prepositionate) {
// Create a new node ...
var model = this.getModel();
var mindmap = model.getMindmap();
var childModel = mindmap.createNode(mindplot.NodeModel.MAIN_TOPIC_TYPE);
mindplot.CentralTopic.prototype.createChildModel = function(prepositionate)
{
// Create a new node ...
var model = this.getModel();
var mindmap = model.getMindmap();
var childModel = mindmap.createNode(mindplot.NodeModel.MAIN_TOPIC_TYPE);
if (prepositionate) {
if (!$defined(this.___siblingDirection)) {
this.___siblingDirection = 1;
}
if(prepositionate){
if (!$defined(this.___siblingDirection))
{
this.___siblingDirection = 1;
// Position following taking into account this internal flag ...
if (this.___siblingDirection == 1) {
childModel.setPosition(150, 0);
} else {
childModel.setPosition(-150, 0);
}
this.___siblingDirection = -this.___siblingDirection;
}
// Create a new node ...
childModel.setOrder(0);
// Position following taking into account this internal flag ...
if (this.___siblingDirection == 1)
{
return childModel;
},
childModel.setPosition(150, 0);
} else
{
childModel.setPosition(-150, 0);
}
this.___siblingDirection = -this.___siblingDirection;
_defaultShapeType : function() {
return mindplot.NodeModel.SHAPE_TYPE_ROUNDED_RECT;
},
updateTopicShape : function() {
},
_updatePositionOnChangeSize : function(oldSize, newSize, updatePosition) {
// Center main topic ...
var zeroPoint = new core.Point(0, 0);
this.setPosition(zeroPoint);
},
_defaultText : function() {
return "Central Topic";
},
_defaultBackgroundColor : function() {
return "#f7f7f7";
},
_defaultBorderColor : function() {
return "#023BB9";
},
_defaultFontStyle : function() {
return {
font:"Verdana",
size: 10,
style:"normal",
weight:"bold",
color:"#023BB9"
};
}
// Create a new node ...
childModel.setOrder(0);
return childModel;
};
mindplot.CentralTopic.prototype._defaultShapeType = function()
{
return mindplot.NodeModel.SHAPE_TYPE_ROUNDED_RECT;
};
mindplot.CentralTopic.prototype.updateTopicShape = function()
{
};
mindplot.CentralTopic.prototype._updatePositionOnChangeSize = function(oldSize, newSize, updatePosition) {
// Center main topic ...
var zeroPoint = new core.Point(0, 0);
this.setPosition(zeroPoint);
};
mindplot.CentralTopic.prototype._defaultText = function()
{
return "Central Topic";
};
mindplot.CentralTopic.prototype._defaultBackgroundColor = function()
{
return "#f7f7f7";
};
mindplot.CentralTopic.prototype._defaultBorderColor = function()
{
return "#023BB9";
};
mindplot.CentralTopic.prototype._defaultFontStyle = function()
{
return {
font:"Verdana",
size: 10,
style:"normal",
weight:"bold",
color:"#023BB9"
};
};
});