Merge branch 'wise-doc' of ssh://wisemapping.com/var/git-repos/wise-source into wise-doc
This commit is contained in:
@@ -159,7 +159,7 @@ mindplot.MindmapDesigner = new Class({
|
||||
var selectableObjects = this.getSelectedObjects();
|
||||
|
||||
// Disable all nodes on focus but not the current if Ctrl key isn't being pressed
|
||||
if (!$defined(event) || event.ctrlKey == false) {
|
||||
if (!$defined(event) || (event.ctrlKey == false && event.metaKey == false)) {
|
||||
selectableObjects.forEach(function(selectableObject) {
|
||||
if (selectableObject.isOnFocus() && selectableObject != currentObject) {
|
||||
selectableObject.setOnFocus(false);
|
||||
@@ -333,7 +333,7 @@ mindplot.MindmapDesigner = new Class({
|
||||
this._actionRunner.markAsChangeBase();
|
||||
},
|
||||
|
||||
loadFromCollaborativeModel: function(collaborationManager){
|
||||
loadFromCollaborativeModel: function(collaborationManager) {
|
||||
var mindmap = collaborationManager.buildWiseModel();
|
||||
this._loadMap(1, mindmap);
|
||||
|
||||
@@ -745,7 +745,7 @@ mindplot.MindmapDesigner = new Class({
|
||||
dialog.adopt(msg).show();
|
||||
|
||||
// IE doesn't like too much this focus action...
|
||||
if (!core.UserAgent.isIE()) {
|
||||
if (!Browser.ie) {
|
||||
urlInput.focus();
|
||||
}
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ mindplot.Workspace = new Class({
|
||||
workspace.setCoordOrigin(coordOriginX, coordOriginY);
|
||||
|
||||
// Change cursor.
|
||||
if (core.UserAgent.isMozillaFamily()) {
|
||||
if (Browser.firefox) {
|
||||
window.document.body.style.cursor = "-moz-grabbing";
|
||||
} else {
|
||||
window.document.body.style.cursor = "move";
|
||||
|
@@ -101,7 +101,7 @@ mindplot.widget.ColorPalettePanel = new Class({
|
||||
},
|
||||
|
||||
show : function() {
|
||||
if (!this.isVisible()) {
|
||||
if (!this.isVisible()) {
|
||||
|
||||
this.parent();
|
||||
var panelElem = this._getPanelElem();
|
||||
@@ -115,9 +115,10 @@ mindplot.widget.ColorPalettePanel = new Class({
|
||||
// Mark the cell as selected ...
|
||||
var colorCells = panelElem.getElements('div[class=palette-colorswatch]');
|
||||
var model = this.getModel();
|
||||
var modelValue = model.getValue();
|
||||
colorCells.forEach(function(elem) {
|
||||
var color = elem.getStyle("background-color");
|
||||
if (model.getValue() == color) {
|
||||
if (modelValue == color) {
|
||||
elem.parentNode.className = 'palette-cell palette-cell-selected';
|
||||
}
|
||||
});
|
||||
|
@@ -43,9 +43,16 @@ mindplot.widget.Menu = new Class({
|
||||
var fontFamilyModel = {
|
||||
getValue: function() {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getFontFamily();
|
||||
var result = null;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var fontFamily = nodes[i].getFontFamily();
|
||||
if (result != null && result != fontFamily) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = fontFamily;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
setValue: function(value) {
|
||||
@@ -58,9 +65,16 @@ mindplot.widget.Menu = new Class({
|
||||
var fontSizeModel = {
|
||||
getValue: function() {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getFontSize();
|
||||
var result = null;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var fontSize = nodes[i].getFontSize();
|
||||
if (result != null && result != fontSize) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = fontSize;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
setValue: function(value) {
|
||||
designer.setFontSize2SelectedNode(value);
|
||||
@@ -71,9 +85,16 @@ mindplot.widget.Menu = new Class({
|
||||
var topicShapeModel = {
|
||||
getValue: function() {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getShapeType();
|
||||
var result = null;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var shapeType = nodes[i].getShapeType();
|
||||
if (result != null && result != shapeType) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = shapeType;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
setValue: function(value) {
|
||||
designer.setShape2SelectedNode(value);
|
||||
@@ -97,10 +118,16 @@ mindplot.widget.Menu = new Class({
|
||||
{
|
||||
getValue : function() {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getBackgroundColor();
|
||||
var result = null;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var color = nodes[i].getBackgroundColor();
|
||||
if (result != null && result != color) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = color;
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
},
|
||||
setValue : function (hex) {
|
||||
designer.setBackColor2SelectedNode(hex);
|
||||
@@ -113,9 +140,16 @@ mindplot.widget.Menu = new Class({
|
||||
{
|
||||
getValue : function() {
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getBorderColor();
|
||||
var result = null;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var color = nodes[i].getBorderColor();
|
||||
if (result != null && result != color) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = color;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
setValue : function (hex) {
|
||||
designer.setBorderColor2SelectedNode(hex);
|
||||
@@ -127,10 +161,17 @@ mindplot.widget.Menu = new Class({
|
||||
var fontColorModel =
|
||||
{
|
||||
getValue : function() {
|
||||
var result = null;
|
||||
var nodes = designer.getSelectedNodes();
|
||||
if (nodes.length == 1) {
|
||||
return nodes[0].getFontColor();
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
var color = nodes[i].getFontColor();
|
||||
if (result != null && result != color) {
|
||||
result = null;
|
||||
break;
|
||||
}
|
||||
result = color;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
setValue : function (hex) {
|
||||
designer.setFontColor2SelectedNode(hex);
|
||||
|
@@ -98,7 +98,7 @@ TestCase("Mindplot test",{
|
||||
|
||||
var fireNativeEvent = function(type, target, position){
|
||||
var event;
|
||||
if(core.UserAgent.isIE()){
|
||||
if(Browser.ie){
|
||||
event = document.createEventObject();
|
||||
event.screenX = position.x;
|
||||
event.screenY = position.y;
|
||||
|
@@ -24,7 +24,7 @@
|
||||
console.log("value:" + value);
|
||||
}
|
||||
};
|
||||
var palette = new mindplot.widget.ColorPalette('myButton', model,"/mindplot/src/main/javascript/widget");
|
||||
var palette = new mindplot.widget.ColorPalettePanel('myButton', model,"/mindplot/src/main/javascript/widget");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user