adding multiple line support editor and in nodes

This commit is contained in:
Pablo Luna
2011-04-19 17:01:12 +01:00
parent c804b3715e
commit 5aa6775a85
19 changed files with 398 additions and 32 deletions

View File

@@ -24,7 +24,9 @@ mindplot.ActionIcon = function(topic, url) {
objects.extend(mindplot.ActionIcon, mindplot.Icon);
mindplot.ActionIcon.prototype.initialize = function() {
var pos = this.getImage.getPosition();
var size = this.getSize();
this._position = new core.Point(pos.x - size.width/2, pos.y - size.height/2);
};
mindplot.ActionIcon.prototype.getNode = function(){
@@ -33,9 +35,14 @@ mindplot.ActionIcon.prototype.getNode = function(){
mindplot.ActionIcon.prototype.setPosition = function(x,y){
var size = this.getSize();
this._position = new core.Point(x,y);
this.getImage().setPosition(x-size.width/2, y-size.height/2);
};
mindplot.ActionIcon.prototype.getPosition = function(){
return this._position;
};
mindplot.ActionIcon.prototype.addEventListener = function(event, fn){
this.getImage().addEventListener(event, fn);
};