Resize icons on scale.

This commit is contained in:
Paulo Veiga
2011-09-02 20:05:51 -03:00
parent 001ff2e371
commit b1b0ee0de8
4 changed files with 41 additions and 6 deletions

View File

@@ -48,11 +48,12 @@ mindplot.IconGroup = new Class({
seIconSize : function(width, height) {
this._iconSize = {width:width,height:height};
this._group.setCoordSize(width / mindplot.Icon.HEIGHT, height / mindplot.Icon.HEIGHT);
this._resize(this._icons.length);
},
addIcon : function(icon) {
$defined(icon, "icon is not defined");
icon.getImage().setVisibility(false);
icon.setGroup(this);
this._icons.push(icon);
@@ -66,6 +67,8 @@ mindplot.IconGroup = new Class({
// Register event for the group ..
this._removeTip.decorate(this._topicId, icon);
icon.getImage().setVisibility(true);
},
_findIconFromUrl : function(url) {