Fix change shape bug.

This commit is contained in:
Paulo Gustavo Veiga
2012-02-27 22:47:10 -03:00
parent e67b2ba50b
commit 1fefb929da
7 changed files with 54 additions and 24 deletions

View File

@@ -656,7 +656,7 @@ mindplot.Designer = new Class({
changeBackgroundColor : function(color) {
var validateFunc = function(topic) {
return topic.getShapeType() != mindplot.model.INodeModel.SHAPE_TYPE_LINE
return topic.getShapeType() != mindplot.model.TopicShape.LINE;
};
var validateError = 'Color can not be set to line topics.';
@@ -668,7 +668,7 @@ mindplot.Designer = new Class({
changeBorderColor : function(color) {
var validateFunc = function(topic) {
return topic.getShapeType() != mindplot.model.INodeModel.SHAPE_TYPE_LINE
return topic.getShapeType() != mindplot.model.TopicShape.LINE ;
};
var validateError = 'Color can not be set to line topics.';
var topicsIds = this.getModel().filterTopicsIds(validateFunc, validateError);
@@ -686,7 +686,7 @@ mindplot.Designer = new Class({
changeTopicShape : function(shape) {
var validateFunc = function(topic) {
return !(topic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE && shape == mindplot.model.INodeModel.SHAPE_TYPE_LINE)
return !(topic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE && shape == mindplot.model.TopicShape.LINE)
};
var validateError = 'Central Topic shape can not be changed to line figure.';