TextEditor is positioned based on mootools functions.

This commit is contained in:
Paulo Veiga
2011-08-23 20:56:01 -03:00
parent fb39e32b33
commit 1f5dbfb5d2
6 changed files with 12 additions and 27 deletions

View File

@@ -41,7 +41,11 @@ mindplot.TextEditor = new Class({
});
inputContainer.inject(result);
var inputText = new Element('input', {type:"text",tabindex:'-1', value:""});
var inputText = new Element('input',
{type:"text",
tabindex:'-1',
value:""}
);
inputText.setStyles({
border:"none",
background:"transparent"
@@ -146,7 +150,7 @@ mindplot.TextEditor = new Class({
// Set editor's initial size
var displayFunc = function() {
// Position the editor and set the size...
var textShape = this._topic.getTextShape();
var textShape = this._topic.getTextShape();
textShape.positionRelativeTo(this._divElem, {
position: {x: 'left',y:'top'},
edge: {x: 'left', y: 'top'}
@@ -221,10 +225,6 @@ mindplot.TextEditor = new Class({
this._divElem.style.height = this._size.height + "px";
},
_setPosition : function (x, y) {
$(this._divElem).setStyles({top : y + "px", left: x + "px"});
},
_changeCursor : function(inputElem, selectText) {
// Select text if it's required ...
if (inputElem.createTextRange) //ie