mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix missing migrated event...
This commit is contained in:
parent
36e44c13ca
commit
b15ff84a94
@ -94,8 +94,14 @@ mindplot.ActionDispatcher = new Class({
|
||||
changeFontWeightToTopic : function(topicsIds) {
|
||||
throw "method must be implemented.";
|
||||
},
|
||||
|
||||
changeTextOnTopic : function(topicsIds, text) {
|
||||
throw "method must be implemented.";
|
||||
},
|
||||
|
||||
shrinkBranch : function(topicsIds, collapse)
|
||||
{
|
||||
throw "method must be implemented.";
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -201,8 +201,11 @@ mindplot.DragPivot = new Class({
|
||||
// Connected to Rect ...
|
||||
var connectRect = this._connectRect;
|
||||
var targetSize = targetTopic.getSize();
|
||||
var width = targetSize.width;
|
||||
var height = targetSize.height;
|
||||
|
||||
// Add 4 pixel in order to keep create a rect bigger than the topic.
|
||||
var width = targetSize.width + 4;
|
||||
var height = targetSize.height + 4;
|
||||
|
||||
connectRect.setSize(width, height);
|
||||
|
||||
var targetPosition = targetTopic.getPosition();
|
||||
|
@ -71,7 +71,8 @@ mindplot.DragTopicPositioner = new Class({
|
||||
// Finally, connect nodes ...
|
||||
if (!dragTopic.isConnected()) {
|
||||
var centalTopic = topics[0];
|
||||
if ($defined(mainTopicToMainTopicConnection)) {
|
||||
if ($defined(mainTopicToMainTopicConnection))
|
||||
{
|
||||
dragTopic.connectTo(mainTopicToMainTopicConnection);
|
||||
} else if (Math.abs(dragTopic.getPosition().x - centalTopic.getPosition().x) <= mindplot.DragTopicPositioner.CENTRAL_TO_MAINTOPIC_MAX_HORIZONTAL_DISTANCE) {
|
||||
dragTopic.connectTo(centalTopic);
|
||||
@ -82,7 +83,6 @@ mindplot.DragTopicPositioner = new Class({
|
||||
_lookUpForMainTopicToMainTopicConnection : function(dragTopic) {
|
||||
var topics = this._topics;
|
||||
var result = null;
|
||||
var clouserDistance = -1;
|
||||
var draggedNode = dragTopic.getDraggedTopic();
|
||||
var distance = null;
|
||||
|
||||
|
@ -220,6 +220,18 @@ mindplot.LocalActionDispatcher = new Class({
|
||||
this.execute(command);
|
||||
},
|
||||
|
||||
shrinkBranch : function(topicsIds, collapse) {
|
||||
$assert(topicsIds, "topicsIds can not be null");
|
||||
|
||||
var commandFunc = function(topic, isShrink) {
|
||||
topic.setChildrenShrinked(isShrink);
|
||||
return !isShrink;
|
||||
};
|
||||
|
||||
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, topicsIds, collapse);
|
||||
this.execute(command);
|
||||
},
|
||||
|
||||
execute:function(command) {
|
||||
this._actionRunner.execute(command);
|
||||
}
|
||||
|
@ -26,18 +26,11 @@ mindplot.ShirinkConnector = new Class({
|
||||
elipse.setSize(mindplot.Topic.CONNECTOR_WIDTH, mindplot.Topic.CONNECTOR_WIDTH);
|
||||
elipse.addEventListener('click', function(event) {
|
||||
var model = topic.getModel();
|
||||
var isShrink = !model.areChildrenShrinked();
|
||||
var collapse = !model.areChildrenShrinked();
|
||||
|
||||
var actionRunner = mindplot.DesignerActionRunner.getInstance();
|
||||
var topicId = topic.getId();
|
||||
|
||||
var commandFunc = function(topic, isShrink) {
|
||||
topic.setChildrenShrinked(isShrink);
|
||||
return !isShrink;
|
||||
};
|
||||
|
||||
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, isShrink, [topicId]);
|
||||
actionRunner.execute(command);
|
||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
actionDispatcher.shrinkBranch([topicId],collapse);
|
||||
|
||||
var e = new Event(event).stop();
|
||||
e.preventDefault();
|
||||
|
@ -12,7 +12,9 @@
|
||||
<link rel="stylesheet" type="text/css" href="../css/editor.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../css/bubble.css"/>
|
||||
|
||||
<!--<script type='text/javascript' src='http://docs.google.com/brix/static/api/js/jsapi.nocache.js'></script>-->
|
||||
<!--<script type='text/javascript' src='../js/wiseLibrary.js'></script>-->
|
||||
|
||||
<script type='text/javascript' src='../js/mootools-core-1.3.2-full-compat.js'></script>
|
||||
<script type='text/javascript' src='../js/mootools-more-1.3.2.1-yui.js'></script>
|
||||
|
||||
@ -25,6 +27,9 @@
|
||||
|
||||
<script type='text/javascript' src='../../../../../core-js/target/classes/core.js'></script>
|
||||
|
||||
'></script>
|
||||
|
||||
|
||||
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
@ -69,14 +74,10 @@
|
||||
// @Todo: This must be persited in the map properties ...
|
||||
var mapId = '1';
|
||||
var mapXml = '<map name="38298" version="pela"><topic central="true" text="test" id="1"/></map>';
|
||||
|
||||
|
||||
var editorProperties = {zoom:0.85,saveOnLoad:true};
|
||||
|
||||
function printMap() {
|
||||
document.printForm.mapSvg.value = $("workspaceContainer").innerHTML;
|
||||
document.printForm.submit();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div id="colorPalette">
|
||||
|
@ -365,7 +365,7 @@ function buildMindmapDesigner() {
|
||||
var screenHeight = window.getHeight();
|
||||
|
||||
// header - footer
|
||||
screenHeight = screenHeight-115;
|
||||
screenHeight = screenHeight - 115;
|
||||
|
||||
// body margin ...
|
||||
editorProperties.width = screenWidth;
|
||||
@ -391,8 +391,7 @@ function createColorPalette(container, onSelectFunction, event) {
|
||||
var colorPaletteElement = $("colorPalette");
|
||||
colorPaletteElement.setStyle('left', (mouseCoords.x - 80) + "px");
|
||||
colorPaletteElement.setStyle('display', "block");
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
function cleanScreenEvent() {
|
||||
if (this.currentColorPicker) {
|
||||
@ -435,9 +434,8 @@ function shapeTypePanel() {
|
||||
function fontSizePanel() {
|
||||
var shapeTypePanel = ['small','normal','large','huge'];
|
||||
var map = {small:'6',normal:'8',large:'10',huge:'15'};
|
||||
var updateFunction = function(value) {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
var value = map[value];
|
||||
var updateFunction = function(key) {
|
||||
var value = map[key];
|
||||
designer.setFontSize2SelectedNode(value);
|
||||
};
|
||||
|
||||
@ -488,7 +486,6 @@ function buildPanel(buttonElemId, elemLinksContainer, elemLinkIds, updateFunctio
|
||||
if (!isRendered) {
|
||||
container.setStyle('left', (mouseCoords.x - 10) + "px");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var fontOnClick = function(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user