Fix selected icon.
parent
d27d15e162
commit
96b40058cc
|
@ -37,13 +37,16 @@ mindplot.widget.IconPanel = new Class({
|
||||||
}
|
}
|
||||||
|
|
||||||
var iconId = familyIcons[j];
|
var iconId = familyIcons[j];
|
||||||
var img = new Element('img').setStyles({width:16,height:16,padding:"0px 2px"}).inject(familyContent);
|
var img = new Element('img', {
|
||||||
img.id = iconId;
|
id:iconId,
|
||||||
img.src = mindplot.ImageIcon.prototype._getImageUrl(iconId);
|
src:mindplot.ImageIcon.prototype._getImageUrl(iconId)
|
||||||
|
});
|
||||||
|
img.setStyles({width:16,height:16,padding:"0px 2px"}).inject(familyContent);
|
||||||
|
|
||||||
|
var model = this.getModel();
|
||||||
img.addEvent('click', function() {
|
img.addEvent('click', function() {
|
||||||
this.getModel().setValue(img.id);
|
model.setValue(this.id);
|
||||||
}.bind(this));
|
}.bind(img));
|
||||||
|
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue