mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Fix minor loading issue.
This commit is contained in:
parent
66d7986d54
commit
11ee13fb60
@ -68,10 +68,6 @@ core.assert = function(assert, message)
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
core.findElement = function(name)
|
|
||||||
{
|
|
||||||
return $(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
Math.sign = function(value)
|
Math.sign = function(value)
|
||||||
{
|
{
|
||||||
|
@ -89,15 +89,3 @@ window.onerror = function(sMsg, sUrl, sLine)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
window.__coreLoad = function()
|
|
||||||
{
|
|
||||||
if (window.afterCoreLoading)
|
|
||||||
{
|
|
||||||
window.afterCoreLoading();
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
setTimeout("window.__coreLoad()", 2000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
window.__coreLoad();
|
|
||||||
|
@ -55,8 +55,8 @@ mindplot.TextEditor = function(screenManager,actionRunner)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var span =core.findElement('spanText');
|
var span =$('spanText');
|
||||||
var input = core.findElement('inputText');
|
var input = $('inputText');
|
||||||
span.innerHTML = input.value;
|
span.innerHTML = input.value;
|
||||||
var size = input.value.length + 1;
|
var size = input.value.length + 1;
|
||||||
input.size= size;
|
input.size= size;
|
||||||
@ -90,7 +90,7 @@ mindplot.TextEditor = function(screenManager,actionRunner)
|
|||||||
|
|
||||||
if (core.UserAgent.isSVGSupported())
|
if (core.UserAgent.isSVGSupported())
|
||||||
{
|
{
|
||||||
setTimeout("core.findElement('ffoxWorkarroundInput').focus();", 0);
|
setTimeout("$('ffoxWorkarroundInput').focus();", 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.fx = new Fx.Style(this.inputText, 'opacity', { duration: 10});
|
this.fx = new Fx.Style(this.inputText, 'opacity', { duration: 10});
|
||||||
@ -262,8 +262,8 @@ mindplot.TextEditor.prototype.init = function (nodeGraph)
|
|||||||
|
|
||||||
mindplot.TextEditor.prototype.setStyle = function (fontStyle)
|
mindplot.TextEditor.prototype.setStyle = function (fontStyle)
|
||||||
{
|
{
|
||||||
var inputField = core.findElement("inputText");
|
var inputField = $("inputText");
|
||||||
var spanField = core.findElement("spanText");
|
var spanField = $("spanText");
|
||||||
if (!core.Utils.isDefined(fontStyle.font))
|
if (!core.Utils.isDefined(fontStyle.font))
|
||||||
{
|
{
|
||||||
fontStyle.font = "Arial";
|
fontStyle.font = "Arial";
|
||||||
@ -293,18 +293,18 @@ mindplot.TextEditor.prototype.setStyle = function (fontStyle)
|
|||||||
|
|
||||||
mindplot.TextEditor.prototype.setText = function(text)
|
mindplot.TextEditor.prototype.setText = function(text)
|
||||||
{
|
{
|
||||||
var inputField = core.findElement("inputText");
|
var inputField = $("inputText");
|
||||||
inputField.size = text.length + 1;
|
inputField.size = text.length + 1;
|
||||||
//this._myOverlay.cfg.setProperty("width", (inputField.size * parseInt(inputField.style.fontSize) + 100) + "px");
|
//this._myOverlay.cfg.setProperty("width", (inputField.size * parseInt(inputField.style.fontSize) + 100) + "px");
|
||||||
this._myOverlay.style.width = (inputField.size * parseInt(inputField.style.fontSize) + 100) + "px";
|
this._myOverlay.style.width = (inputField.size * parseInt(inputField.style.fontSize) + 100) + "px";
|
||||||
var spanField = core.findElement("spanText");
|
var spanField = $("spanText");
|
||||||
spanField.innerHTML = text;
|
spanField.innerHTML = text;
|
||||||
inputField.value = text;
|
inputField.value = text;
|
||||||
};
|
};
|
||||||
|
|
||||||
mindplot.TextEditor.prototype.getText = function()
|
mindplot.TextEditor.prototype.getText = function()
|
||||||
{
|
{
|
||||||
return core.findElement('inputText').value;
|
return $('inputText').value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ mindplot.TextEditor.prototype.setEditorSize = function (width, height, scale)
|
|||||||
|
|
||||||
mindplot.TextEditor.prototype.getSize = function ()
|
mindplot.TextEditor.prototype.getSize = function ()
|
||||||
{
|
{
|
||||||
return {width:core.findElement("spanText").offsetWidth,height:core.findElement("spanText").offsetHeight};
|
return {width:$("spanText").offsetWidth,height:$("spanText").offsetHeight};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -343,12 +343,12 @@ mindplot.TextEditor.prototype.showTextEditor = function(selectText)
|
|||||||
//elem._myOverlay.cfg.setProperty("xy", [0, 0]);
|
//elem._myOverlay.cfg.setProperty("xy", [0, 0]);
|
||||||
//elem._myOverlay.cfg.setProperty("visible", true);
|
//elem._myOverlay.cfg.setProperty("visible", true);
|
||||||
//select the text in the input
|
//select the text in the input
|
||||||
core.findElement('inputText').disabled = false;
|
$('inputText').disabled = false;
|
||||||
|
|
||||||
if (core.findElement('inputText').createTextRange) //ie
|
if ($('inputText').createTextRange) //ie
|
||||||
{
|
{
|
||||||
var range = core.findElement('inputText').createTextRange();
|
var range = $('inputText').createTextRange();
|
||||||
var pos = core.findElement('inputText').value.length;
|
var pos = $('inputText').value.length;
|
||||||
if(selectText)
|
if(selectText)
|
||||||
{
|
{
|
||||||
range.select();
|
range.select();
|
||||||
@ -362,7 +362,7 @@ mindplot.TextEditor.prototype.showTextEditor = function(selectText)
|
|||||||
}
|
}
|
||||||
else if(selectText)
|
else if(selectText)
|
||||||
{
|
{
|
||||||
core.findElement('inputText').setSelectionRange(0, core.findElement('inputText').value.length);
|
$('inputText').setSelectionRange(0, $('inputText').value.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
var executor = function(editor)
|
var executor = function(editor)
|
||||||
@ -370,7 +370,7 @@ mindplot.TextEditor.prototype.showTextEditor = function(selectText)
|
|||||||
return function()
|
return function()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
core.findElement('inputText').focus();
|
$('inputText').focus();
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
@ -389,7 +389,7 @@ mindplot.TextEditor.prototype.lostFocus = function(bothBrowsers)
|
|||||||
if (this._isVisible())
|
if (this._isVisible())
|
||||||
{
|
{
|
||||||
//the editor is opened in another node. lets Finish it.
|
//the editor is opened in another node. lets Finish it.
|
||||||
var fireOnThis = core.findElement('inputText');
|
var fireOnThis = $('inputText');
|
||||||
fireOnThis.fireEvent('blur');
|
fireOnThis.fireEvent('blur');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(afterWisemapLoading)
|
if(afterMindpotLibraryLoading)
|
||||||
{
|
{
|
||||||
afterWisemapLoading();
|
afterMindpotLibraryLoading();
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ web2d.peer.ToolkitVML =
|
|||||||
var domDocument = window.document;
|
var domDocument = window.document;
|
||||||
//ownerDocument;
|
//ownerDocument;
|
||||||
// Add VML includes and namespace
|
// Add VML includes and namespace
|
||||||
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml");
|
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML");
|
||||||
|
|
||||||
var style = domDocument.createStyleSheet();
|
var style = domDocument.createStyleSheet();
|
||||||
style.addRule('v\\:*', "behavior: url(#default#VML);");
|
style.addRule('v\\:*', "behavior: url(#default#VML);");
|
||||||
|
@ -17,6 +17,23 @@
|
|||||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
function afterCoreLoading()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (core.UserAgent.isVMLSupported())
|
||||||
|
{
|
||||||
|
$import("../js/mindplot.vml.js");
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$import("../js/mindplot.svg.js");
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
afterCoreLoading();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Extend mootools known keys*/
|
/*Extend mootools known keys*/
|
||||||
ExtendedKeys = {
|
ExtendedKeys = {
|
||||||
'insert': 45,
|
'insert': 45,
|
||||||
@ -163,23 +180,9 @@ Tabs.Init();
|
|||||||
// Hide the content while waiting for the onload event to trigger.
|
// Hide the content while waiting for the onload event to trigger.
|
||||||
var contentId = window.location.hash || "#Introduction";
|
var contentId = window.location.hash || "#Introduction";
|
||||||
|
|
||||||
function afterCoreLoading()
|
|
||||||
{
|
|
||||||
|
|
||||||
if (core.UserAgent.isVMLSupported())
|
|
||||||
{
|
|
||||||
$import("../js/mindplot.vml.js");
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
$import("../js/mindplot.svg.js");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
var iconPanel = null;
|
var iconPanel = null;
|
||||||
|
|
||||||
function afterWisemapLoading()
|
function afterMindpotLibraryLoading()
|
||||||
{
|
{
|
||||||
buildMindmapDesigner();
|
buildMindmapDesigner();
|
||||||
|
|
||||||
|
@ -27,10 +27,11 @@ function afterCoreLoading()
|
|||||||
$import("../js/mindplot.svg.js");
|
$import("../js/mindplot.svg.js");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
;
|
|
||||||
|
|
||||||
function afterWisemapLoading()
|
afterCoreLoading();
|
||||||
|
|
||||||
|
function afterMindpotLibraryLoading()
|
||||||
{
|
{
|
||||||
buildMindmapDesigner();
|
buildMindmapDesigner();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user