Introduce the convept of Feature to a topic.

This commit is contained in:
Paulo Gustavo Veiga
2012-02-27 18:17:15 -03:00
parent 9e44804314
commit 7ba0e36cb9
26 changed files with 483 additions and 1240 deletions

View File

@@ -83,10 +83,10 @@ mindplot.IconGroup = new Class({
_findIconFromModel : function(iconModel) {
var result = null;
this._icons.each(function(el) {
var elModel = el.getModel();
if (result == null && $defined(elModel.isIconModel) && elModel.getId() == iconModel.getId()) {
result = el;
this._icons.each(function(icon) {
var elModel = icon.getModel();
if (elModel.getId() == iconModel.getId()) {
result = icon;
}
}, this);
@@ -110,6 +110,13 @@ mindplot.IconGroup = new Class({
this._removeIcon(icon);
},
removeIconByModel : function(featureModel) {
$assert(featureModel, "featureModel can not be null");
var icon = this._findIconFromModel(featureModel);
this._removeIcon(icon);
},
_removeIcon : function(icon) {
$assert(icon, "icon can not be null");