mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
Merge branch 'master' of ssh://wisemapping.com/var/git-repos/wise-source
This commit is contained in:
commit
d20a4bfcea
@ -84,9 +84,18 @@
|
|||||||
<filelist dir="${basedir}/src/main/javascript/" files="DragTopic.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="DragTopic.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="DragManager.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="DragManager.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="DragPivot.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="DragPivot.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="Board.js"/>
|
<filelist dir="${basedir}/src/main/javascript/layout/boards/original/"
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="CentralTopicBoard.js"/>
|
files="Board.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="MainTopicBoard.js"/>
|
<filelist dir="${basedir}/src/main/javascript/layout/boards/original/"
|
||||||
|
files="CentralTopicBoard.js"/>
|
||||||
|
<filelist dir="${basedir}/src/main/javascript/layout/boards/original/"
|
||||||
|
files="MainTopicBoard.js"/>
|
||||||
|
<filelist dir="${basedir}/src/main/javascript/layout/boards/original/"
|
||||||
|
files="FixedDistanceBoard.js"/>
|
||||||
|
<filelist dir="${basedir}/src/main/javascript//layout/boards/original/"
|
||||||
|
files="VariableDistanceBoard.js"/>
|
||||||
|
|
||||||
|
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="ConnectionLine.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="ConnectionLine.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="RelationshipLine.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="RelationshipLine.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="DragTopicPositioner.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="DragTopicPositioner.js"/>
|
||||||
@ -94,10 +103,9 @@
|
|||||||
<filelist dir="${basedir}/src/main/javascript/" files="MultilineTextEditor.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="MultilineTextEditor.js"/>
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/" files="RichTextEditor.js"/>-->
|
<!--<filelist dir="${basedir}/src/main/javascript/" files="RichTextEditor.js"/>-->
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="TextEditorFactory.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="TextEditorFactory.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="VariableDistanceBoard.js"/>
|
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="util/Shape.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="util/Shape.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="FixedDistanceBoard.js"/>
|
<filelist dir="${basedir}/src/main/javascript/layout/boards/original/"
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="BoardEntry.js"/>
|
files="BoardEntry.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/" files="ModelCodeName.js"/>
|
<filelist dir="${basedir}/src/main/javascript/" files="ModelCodeName.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/"
|
<filelist dir="${basedir}/src/main/javascript/"
|
||||||
files="XMLMindmapSerializer_Pela.js"/>
|
files="XMLMindmapSerializer_Pela.js"/>
|
||||||
@ -152,21 +160,21 @@
|
|||||||
<filelist dir="${basedir}/src/main/javascript/"
|
<filelist dir="${basedir}/src/main/javascript/"
|
||||||
files="commands/MoveControlPointCommand.js"/>
|
files="commands/MoveControlPointCommand.js"/>
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="commands/freeMind/DragTopicCommand.js"/>-->
|
<!--files="commands/freeMind/DragTopicCommand.js"/>-->
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="commands/freeMind/ReconnectTopicCommand.js"/>-->
|
<!--files="commands/freeMind/ReconnectTopicCommand.js"/>-->
|
||||||
|
|
||||||
|
|
||||||
<filelist dir="${basedir}/src/main/javascript/"
|
<filelist dir="${basedir}/src/main/javascript/"
|
||||||
files="layout/boards/Board.js"/>
|
files="layout/boards/Board.js"/>
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="layout/boards/freemind/Board.js"/>-->
|
<!--files="layout/boards/freemind/Board.js"/>-->
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="layout/boards/freemind/Entry.js"/>-->
|
<!--files="layout/boards/freemind/Entry.js"/>-->
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="layout/boards/freemind/CentralTopicBoard.js"/>-->
|
<!--files="layout/boards/freemind/CentralTopicBoard.js"/>-->
|
||||||
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
<!--<filelist dir="${basedir}/src/main/javascript/"-->
|
||||||
<!--files="layout/boards/freemind/MainTopicBoard.js"/>-->
|
<!--files="layout/boards/freemind/MainTopicBoard.js"/>-->
|
||||||
<filelist dir="${basedir}/src/main/javascript/"
|
<filelist dir="${basedir}/src/main/javascript/"
|
||||||
files="layout/BaseLayoutManager.js"/>
|
files="layout/BaseLayoutManager.js"/>
|
||||||
<filelist dir="${basedir}/src/main/javascript/"
|
<filelist dir="${basedir}/src/main/javascript/"
|
||||||
|
@ -278,3 +278,5 @@ mindplot.MainTopic = new Class({
|
|||||||
var order = this.getOrder();
|
var order = this.getOrder();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mindplot.MainTopic.DEFAULT_MAIN_TOPIC_HEIGHT = 18;
|
||||||
|
@ -1254,3 +1254,6 @@ mindplot.Topic.CONNECTOR_WIDTH = 6;
|
|||||||
mindplot.Topic.OUTER_SHAPE_ATTRIBUTES = {fillColor:'rgb(252,235,192)',stroke:'1 dot rgb(241,163,39)',x:0,y:0};
|
mindplot.Topic.OUTER_SHAPE_ATTRIBUTES = {fillColor:'rgb(252,235,192)',stroke:'1 dot rgb(241,163,39)',x:0,y:0};
|
||||||
mindplot.Topic.OUTER_SHAPE_ATTRIBUTES_FOCUS = {fillColor:'rgb(244,184,45)',x:0,y:0};
|
mindplot.Topic.OUTER_SHAPE_ATTRIBUTES_FOCUS = {fillColor:'rgb(244,184,45)',x:0,y:0};
|
||||||
mindplot.Topic.INNER_RECT_ATTRIBUTES = {stroke:'2 solid'};
|
mindplot.Topic.INNER_RECT_ATTRIBUTES = {stroke:'2 solid'};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,18 +21,18 @@ mindplot.commands.AddIconToTopicCommand = new Class({
|
|||||||
initialize: function(topicId, iconType) {
|
initialize: function(topicId, iconType) {
|
||||||
$assert($defined(topicId), 'topicId can not be null');
|
$assert($defined(topicId), 'topicId can not be null');
|
||||||
$assert(iconType, 'iconType can not be null');
|
$assert(iconType, 'iconType can not be null');
|
||||||
this._objectsIds = topicId;
|
this._topicsIds = topicId;
|
||||||
this._iconType = iconType;
|
this._iconType = iconType;
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
var iconImg = topic.addIcon(this._iconType, commandContext._designer);
|
var iconImg = topic.addIcon(this._iconType, commandContext._designer);
|
||||||
this._iconModel = iconImg.getModel();
|
this._iconModel = iconImg.getModel();
|
||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
topic.removeIcon(this._iconModel);
|
topic.removeIcon(this._iconModel);
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -19,14 +19,14 @@
|
|||||||
mindplot.commands.ChangeLinkToTopicCommand = new Class({
|
mindplot.commands.ChangeLinkToTopicCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicId, url) {
|
initialize: function(topicId, url) {
|
||||||
$assert(topicId, 'topicId can not be null');
|
$assert($defined(topicId), 'topicId can not be null');
|
||||||
this._objectsIds = topicId;
|
this._topicsIds = topicId;
|
||||||
this._url = url;
|
this._url = url;
|
||||||
this._id = mindplot.Command._nextUUID();
|
this._id = mindplot.Command._nextUUID();
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
if (topic.hasLink()) {
|
if (topic.hasLink()) {
|
||||||
var model = topic.getModel();
|
var model = topic.getModel();
|
||||||
var link = model.getLinks()[0];
|
var link = model.getLinks()[0];
|
||||||
@ -37,7 +37,7 @@ mindplot.commands.ChangeLinkToTopicCommand = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
if (this._oldtext) {
|
if (this._oldtext) {
|
||||||
topic.removeLink();
|
topic.removeLink();
|
||||||
topic.addLink(this._oldUrl);
|
topic.addLink(this._oldUrl);
|
||||||
|
@ -19,15 +19,15 @@
|
|||||||
mindplot.commands.ChangeNoteToTopicCommand = new Class({
|
mindplot.commands.ChangeNoteToTopicCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicId, text) {
|
initialize: function(topicId, text) {
|
||||||
$assert(topicId, 'topicId can not be null');
|
$assert($defined(topicId), 'topicId can not be null');
|
||||||
this._objectsIds = topicId;
|
this._topicsIds = topicId;
|
||||||
this._text = text;
|
this._text = text;
|
||||||
this._oldtext = null;
|
this._oldtext = null;
|
||||||
this._id = mindplot.Command._nextUUID();
|
this._id = mindplot.Command._nextUUID();
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
if (topic.hasNote()) {
|
if (topic.hasNote()) {
|
||||||
var model = topic.getModel();
|
var model = topic.getModel();
|
||||||
var notes = model.getNotes()[0];
|
var notes = model.getNotes()[0];
|
||||||
@ -38,7 +38,7 @@ mindplot.commands.ChangeNoteToTopicCommand = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
if (this._oldtext) {
|
if (this._oldtext) {
|
||||||
topic.removeNote();
|
topic.removeNote();
|
||||||
topic.addNote(this._oldtext);
|
topic.addNote(this._oldtext);
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
mindplot.commands.DeleteCommand = new Class({
|
mindplot.commands.DeleteCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicIds, relIds) {
|
initialize: function(topicIds, relIds) {
|
||||||
|
$assert($defined(topicIds), 'topicIds can not be null');
|
||||||
|
|
||||||
this._relIds = relIds;
|
this._relIds = relIds;
|
||||||
this._topicIds = topicIds;
|
this._topicIds = topicIds;
|
||||||
this._deletedTopicModels = [];
|
this._deletedTopicModels = [];
|
||||||
|
@ -21,7 +21,7 @@ mindplot.commands.DragTopicCommand = new Class({
|
|||||||
initialize: function(topicIds, position, order, parentTopic) {
|
initialize: function(topicIds, position, order, parentTopic) {
|
||||||
$assert(topicIds, "topicIds must be defined");
|
$assert(topicIds, "topicIds must be defined");
|
||||||
|
|
||||||
this._objectsIds = topicIds;
|
this._topicsIds = topicIds;
|
||||||
if ($defined(parentTopic))
|
if ($defined(parentTopic))
|
||||||
this._parentId = parentTopic.getId();
|
this._parentId = parentTopic.getId();
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ mindplot.commands.DragTopicCommand = new Class({
|
|||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
|
|
||||||
var topic = commandContext.findTopics([this._objectsIds])[0];
|
var topic = commandContext.findTopics([this._topicsIds])[0];
|
||||||
|
|
||||||
// Save old position ...
|
// Save old position ...
|
||||||
var origParentTopic = topic.getOutgoingConnectedTopic();
|
var origParentTopic = topic.getOutgoingConnectedTopic();
|
||||||
|
@ -20,17 +20,17 @@ mindplot.commands.GenericFunctionCommand = new Class({
|
|||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(commandFunc, topicsIds,value) {
|
initialize: function(commandFunc, topicsIds,value) {
|
||||||
$assert(commandFunc, "commandFunc must be defined");
|
$assert(commandFunc, "commandFunc must be defined");
|
||||||
$assert(topicsIds, "topicsIds must be defined");
|
$assert($defined(topicsIds), "topicsIds must be defined");
|
||||||
|
|
||||||
this._value = value;
|
this._value = value;
|
||||||
this._objectsIds = topicsIds;
|
this._topicsIds = topicsIds;
|
||||||
this._commandFunc = commandFunc;
|
this._commandFunc = commandFunc;
|
||||||
this._oldValues = [];
|
this._oldValues = [];
|
||||||
this._id = mindplot.Command._nextUUID();
|
this._id = mindplot.Command._nextUUID();
|
||||||
},
|
},
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
if (!this.applied) {
|
if (!this.applied) {
|
||||||
var topics = commandContext.findTopics(this._objectsIds);
|
var topics = commandContext.findTopics(this._topicsIds);
|
||||||
topics.forEach(function(topic) {
|
topics.forEach(function(topic) {
|
||||||
var oldValue = this._commandFunc(topic, this._value);
|
var oldValue = this._commandFunc(topic, this._value);
|
||||||
this._oldValues.push(oldValue);
|
this._oldValues.push(oldValue);
|
||||||
@ -43,7 +43,7 @@ mindplot.commands.GenericFunctionCommand = new Class({
|
|||||||
},
|
},
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
if (this.applied) {
|
if (this.applied) {
|
||||||
var topics = commandContext.findTopics(this._objectsIds);
|
var topics = commandContext.findTopics(this._topicsIds);
|
||||||
topics.forEach(function(topic, index) {
|
topics.forEach(function(topic, index) {
|
||||||
this._commandFunc(topic, this._oldValues[index]);
|
this._commandFunc(topic, this._oldValues[index]);
|
||||||
|
|
||||||
|
@ -19,19 +19,19 @@
|
|||||||
mindplot.commands.RemoveIconFromTopicCommand = new Class({
|
mindplot.commands.RemoveIconFromTopicCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicIds, iconModel) {
|
initialize: function(topicIds, iconModel) {
|
||||||
$assert(topicIds, 'topicIds can not be null');
|
$assert($defined(topicIds), 'topicIds can not be null');
|
||||||
$assert(iconModel, 'iconModel can not be null');
|
$assert(iconModel, 'iconModel can not be null');
|
||||||
this._objectsIds = topicIds;
|
this._topicsIds = topicIds;
|
||||||
this._iconModel = iconModel;
|
this._iconModel = iconModel;
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
topic.removeIcon(this._iconModel);
|
topic.removeIcon(this._iconModel);
|
||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
var iconType = this._iconModel.getIconType();
|
var iconType = this._iconModel.getIconType();
|
||||||
var iconImg = topic.addIcon(iconType, commandContext._designer);
|
var iconImg = topic.addIcon(iconType, commandContext._designer);
|
||||||
this._iconModel = iconImg.getModel();
|
this._iconModel = iconImg.getModel();
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
mindplot.commands.RemoveLinkFromTopicCommand = new Class({
|
mindplot.commands.RemoveLinkFromTopicCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicId) {
|
initialize: function(topicId) {
|
||||||
$assert(topicId, 'topicId can not be null');
|
$assert($defined(topicId), 'topicId can not be null');
|
||||||
this._objectsIds = topicId;
|
this._topicsIds = topicId;
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
var model = topic.getModel();
|
var model = topic.getModel();
|
||||||
var links = model.getLinks()[0];
|
var links = model.getLinks()[0];
|
||||||
this._text = links.getUrl();
|
this._text = links.getUrl();
|
||||||
@ -32,7 +32,7 @@ mindplot.commands.RemoveLinkFromTopicCommand = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
topic.addLink(this._url, commandContext._designer);
|
topic.addLink(this._url, commandContext._designer);
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -19,18 +19,18 @@
|
|||||||
mindplot.commands.RemoveNoteFromTopicCommand = new Class({
|
mindplot.commands.RemoveNoteFromTopicCommand = new Class({
|
||||||
Extends:mindplot.Command,
|
Extends:mindplot.Command,
|
||||||
initialize: function(topicId) {
|
initialize: function(topicId) {
|
||||||
$assert(topicId, 'topicId can not be null');
|
$assert($defined(topicId), 'topicId can not be null');
|
||||||
this._objectsIds = topicId;
|
this._topicsIds = topicId;
|
||||||
},
|
},
|
||||||
execute: function(commandContext) {
|
execute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
var model = topic.getModel();
|
var model = topic.getModel();
|
||||||
var notes = model.getNotes()[0];
|
var notes = model.getNotes()[0];
|
||||||
this._text = notes.getText();
|
this._text = notes.getText();
|
||||||
topic.removeNote();
|
topic.removeNote();
|
||||||
},
|
},
|
||||||
undoExecute: function(commandContext) {
|
undoExecute: function(commandContext) {
|
||||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
var topic = commandContext.findTopics(this._topicsIds)[0];
|
||||||
topic.addNote(this._text, commandContext._designer);
|
topic.addNote(this._text, commandContext._designer);
|
||||||
}
|
}
|
||||||
});
|
});
|
@ -20,6 +20,8 @@ var mindplot = {};
|
|||||||
mindplot.util = {};
|
mindplot.util = {};
|
||||||
mindplot.commands = {};
|
mindplot.commands = {};
|
||||||
mindplot.layout = {};
|
mindplot.layout = {};
|
||||||
|
mindplot.layout.boards = {};
|
||||||
|
mindplot.layout.boards.original = {};
|
||||||
mindplot.widget = {};
|
mindplot.widget = {};
|
||||||
mindplot.model = {};
|
mindplot.model = {};
|
||||||
mindplot.collaboration = {};
|
mindplot.collaboration = {};
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* 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.layout.BaseLayoutManager = new Class({
|
mindplot.layout.BaseLayoutManager = new Class({
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* 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.layout.FreeMindLayoutManager = mindplot.layout.BaseLayoutManager.extend({
|
mindplot.layout.FreeMindLayoutManager = mindplot.layout.BaseLayoutManager.extend({
|
||||||
options:{
|
options:{
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* 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.layout.LayoutManagerFactory = {};
|
mindplot.layout.LayoutManagerFactory = {};
|
||||||
mindplot.layout.LayoutManagerFactory.managers = {
|
mindplot.layout.LayoutManagerFactory.managers = {
|
||||||
OriginalLayoutManager:mindplot.layout.OriginalLayoutManager,
|
OriginalLayoutManager:mindplot.layout.OriginalLayoutManager,
|
||||||
|
@ -133,11 +133,11 @@ mindplot.layout.OriginalLayoutManager = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createMainTopicBoard:function(node) {
|
_createMainTopicBoard:function(node) {
|
||||||
return new mindplot.MainTopicBoard(node, this);
|
return new mindplot.layout.boards.original.MainTopicBoard(node, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createCentralTopicBoard:function(node) {
|
_createCentralTopicBoard:function(node) {
|
||||||
return new mindplot.CentralTopicBoard(node, this);
|
return new mindplot.layout.boards.original.CentralTopicBoard(node, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
getClassName:function() {
|
getClassName:function() {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
mindplot.layout.boards = {};
|
|
||||||
|
|
||||||
mindplot.layout.boards.Board = new Class({
|
mindplot.layout.boards.Board = new Class({
|
||||||
Implements: [Events,Options],
|
Implements: [Events,Options],
|
||||||
options: {
|
options: {
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.Board = new Class({
|
mindplot.layout.boards.original.Board = new Class({
|
||||||
initialize : function(defaultHeight, referencePoint) {
|
initialize : function(defaultHeight, referencePoint) {
|
||||||
$assert(referencePoint, "referencePoint can not be null");
|
$assert(referencePoint, "referencePoint can not be null");
|
||||||
this._defaultWidth = defaultHeight;
|
this._defaultWidth = defaultHeight;
|
||||||
this._entries = new mindplot.BidirectionalArray();
|
this._entries = new mindplot.layout.boards.original.BidirectionalArray();
|
||||||
this._referencePoint = referencePoint;
|
this._referencePoint = referencePoint;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ mindplot.Board = new Class({
|
|||||||
/**
|
/**
|
||||||
* ---------------------------------------
|
* ---------------------------------------
|
||||||
*/
|
*/
|
||||||
mindplot.BidirectionalArray = new Class({
|
mindplot.layout.boards.original.BidirectionalArray = new Class({
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this._leftElem = [];
|
this._leftElem = [];
|
@ -16,7 +16,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.BoardEntry = new Class({
|
mindplot.layout.boards.original.BoardEntry = new Class({
|
||||||
initialize:function(lowerLimit, upperLimit, order) {
|
initialize:function(lowerLimit, upperLimit, order) {
|
||||||
if ($defined(lowerLimit) && $defined(upperLimit)) {
|
if ($defined(lowerLimit) && $defined(upperLimit)) {
|
||||||
$assert(lowerLimit < upperLimit, 'lowerLimit can not be greater that upperLimit');
|
$assert(lowerLimit < upperLimit, 'lowerLimit can not be greater that upperLimit');
|
@ -16,13 +16,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.CentralTopicBoard = new Class({
|
mindplot.layout.boards.original.CentralTopicBoard = new Class({
|
||||||
Extends: mindplot.Board,
|
Extends:mindplot.layout.boards.original.Board,
|
||||||
initialize:function(centralTopic, layoutManager) {
|
initialize:function(centralTopic, layoutManager) {
|
||||||
var point = new core.Point(0, 0);
|
var point = new core.Point(0, 0);
|
||||||
this._layoutManager = layoutManager;
|
this._layoutManager = layoutManager;
|
||||||
this._rightBoard = new mindplot.VariableDistanceBoard(50, point);
|
this._rightBoard = new mindplot.layout.boards.original.VariableDistanceBoard(50, point);
|
||||||
this._leftBoard = new mindplot.VariableDistanceBoard(50, point);
|
this._leftBoard = new mindplot.layout.boards.original.VariableDistanceBoard(50, point);
|
||||||
this._centralTopic = centralTopic;
|
this._centralTopic = centralTopic;
|
||||||
},
|
},
|
||||||
|
|
@ -16,8 +16,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.FixedDistanceBoard = new Class({
|
mindplot.layout.boards.original.FixedDistanceBoard = new Class({
|
||||||
Extends:mindplot.Board,
|
Extends:mindplot.layout.boards.original.Board,
|
||||||
initialize:function(defaultHeight, topic, layoutManager) {
|
initialize:function(defaultHeight, topic, layoutManager) {
|
||||||
this._topic = topic;
|
this._topic = topic;
|
||||||
this._layoutManager = layoutManager;
|
this._layoutManager = layoutManager;
|
||||||
@ -56,7 +56,7 @@ mindplot.FixedDistanceBoard = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
createBoardEntry : function(lowerLimit, upperLimit, order) {
|
createBoardEntry : function(lowerLimit, upperLimit, order) {
|
||||||
var result = new mindplot.BoardEntry(lowerLimit, upperLimit, order);
|
var result = new mindplot.layout.boards.original.BoardEntry(lowerLimit, upperLimit, order);
|
||||||
var xPos = this.workoutXBorderDistance();
|
var xPos = this.workoutXBorderDistance();
|
||||||
result.setXPosition(xPos);
|
result.setXPosition(xPos);
|
||||||
return result;
|
return result;
|
||||||
@ -100,9 +100,9 @@ mindplot.FixedDistanceBoard = new Class({
|
|||||||
var result;
|
var result;
|
||||||
if (topicPosition.x >= 0) {
|
if (topicPosition.x >= 0) {
|
||||||
// It's at right.
|
// It's at right.
|
||||||
result = topicPosition.x + halfTargetWidth + mindplot.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE;
|
result = topicPosition.x + halfTargetWidth + mindplot.layout.boards.original.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE;
|
||||||
} else {
|
} else {
|
||||||
result = topicPosition.x - (halfTargetWidth + mindplot.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE);
|
result = topicPosition.x - (halfTargetWidth + mindplot.layout.boards.original.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
@ -140,13 +140,13 @@ mindplot.FixedDistanceBoard = new Class({
|
|||||||
var topicBoardHeight = topicBoard.getHeight();
|
var topicBoardHeight = topicBoard.getHeight();
|
||||||
|
|
||||||
|
|
||||||
height += topicBoardHeight + mindplot.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
height += topicBoardHeight + mindplot.layout.boards.original.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var topic = this._topic;
|
var topic = this._topic;
|
||||||
height = topic.getSize().height + mindplot.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
height = topic.getSize().height + mindplot.layout.boards.original.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
var oldHeight = this._height;
|
var oldHeight = this._height;
|
||||||
@ -193,7 +193,7 @@ mindplot.FixedDistanceBoard = new Class({
|
|||||||
var topicBoard = this._layoutManager.getTopicBoardForTopic(currentTopic);
|
var topicBoard = this._layoutManager.getTopicBoardForTopic(currentTopic);
|
||||||
var topicBoardHeight = topicBoard.getHeight();
|
var topicBoardHeight = topicBoard.getHeight();
|
||||||
|
|
||||||
upperLimit = lowerLimit + topicBoardHeight + mindplot.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
upperLimit = lowerLimit + topicBoardHeight + mindplot.layout.boards.original.FixedDistanceBoard.INTER_TOPIC_DISTANCE;
|
||||||
e.setUpperLimit(upperLimit);
|
e.setUpperLimit(upperLimit);
|
||||||
lowerLimit = upperLimit;
|
lowerLimit = upperLimit;
|
||||||
|
|
||||||
@ -277,8 +277,10 @@ mindplot.FixedDistanceBoard = new Class({
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
;
|
|
||||||
mindplot.FixedDistanceBoard.INTER_TOPIC_DISTANCE = 6;
|
mindplot.layout.boards.original.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE = 60;
|
||||||
mindplot.FixedDistanceBoard.MAIN_TOPIC_TO_MAIN_TOPIC_DISTANCE = 60;
|
mindplot.layout.boards.original.FixedDistanceBoard.INTER_TOPIC_DISTANCE = 6;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.MainTopicBoard = new Class({
|
mindplot.layout.boards.original.MainTopicBoard = new Class({
|
||||||
Extends:mindplot.Board,
|
Extends:mindplot.layout.boards.original.Board,
|
||||||
initialize:function(topic, layoutManager) {
|
initialize:function(topic, layoutManager) {
|
||||||
this._layoutManager = layoutManager;
|
this._layoutManager = layoutManager;
|
||||||
this._topic = topic;
|
this._topic = topic;
|
||||||
@ -29,7 +29,7 @@ mindplot.MainTopicBoard = new Class({
|
|||||||
_getBoard: function() {
|
_getBoard: function() {
|
||||||
if (!$defined(this._board)) {
|
if (!$defined(this._board)) {
|
||||||
var topic = this._topic;
|
var topic = this._topic;
|
||||||
this._board = new mindplot.FixedDistanceBoard(mindplot.MainTopicBoard.DEFAULT_MAIN_TOPIC_HEIGHT, topic, this._layoutManager);
|
this._board = new mindplot.layout.boards.original.FixedDistanceBoard(mindplot.MainTopic.DEFAULT_MAIN_TOPIC_HEIGHT, topic, this._layoutManager);
|
||||||
}
|
}
|
||||||
return this._board;
|
return this._board;
|
||||||
},
|
},
|
||||||
@ -125,5 +125,3 @@ mindplot.MainTopicBoard = new Class({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mindplot.MainTopicBoard.DEFAULT_MAIN_TOPIC_HEIGHT = 18;
|
|
@ -16,8 +16,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.VariableDistanceBoard = new Class({
|
mindplot.layout.boards.original.VariableDistanceBoard = new Class({
|
||||||
Extends: mindplot.Board,
|
Extends: mindplot.layout.boards.original.Board,
|
||||||
initialize: function(defaultHeight, referencePoint) {
|
initialize: function(defaultHeight, referencePoint) {
|
||||||
this.parent(defaultHeight, referencePoint);
|
this.parent(defaultHeight, referencePoint);
|
||||||
var zeroEntryCoordinate = referencePoint.y;
|
var zeroEntryCoordinate = referencePoint.y;
|
||||||
@ -66,7 +66,7 @@ mindplot.VariableDistanceBoard = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
createBoardEntry:function(lowerLimit, upperLimit, order) {
|
createBoardEntry:function(lowerLimit, upperLimit, order) {
|
||||||
return new mindplot.BoardEntry(lowerLimit, upperLimit, order);
|
return new mindplot.layout.boards.original.BoardEntry(lowerLimit, upperLimit, order);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateReferencePoint:function(position) {
|
updateReferencePoint:function(position) {
|
Loading…
Reference in New Issue
Block a user