diff --git a/src/core/wrapper/layout/layout.card.js b/src/core/wrapper/layout/layout.card.js index 6a40ea856..b44527270 100644 --- a/src/core/wrapper/layout/layout.card.js +++ b/src/core/wrapper/layout/layout.card.js @@ -76,7 +76,7 @@ BI.CardLayout = BI.inherit(BI.Layout, { }, _deleteCardByName: function (cardName) { - delete this._children[this.getName() + "_" + cardName]; + delete this._children[this._getChildName(cardName)]; var index = BI.findIndex(this.options.items, function (i, item) { return item.cardName == cardName; }); diff --git a/src/core/wrapper/layout/layout.tape.js b/src/core/wrapper/layout/layout.tape.js index 0938ac549..0ac780665 100644 --- a/src/core/wrapper/layout/layout.tape.js +++ b/src/core/wrapper/layout/layout.tape.js @@ -46,7 +46,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, { var self = this, o = this.options; items = BI.compact(items); BI.each(items, function (i, item) { - if (!self.hasWidget(self.getName() + "_" + i)) { + if (!self.hasWidget(self._getChildName(i))) { var w = BI._lazyCreateWidget(item); self.addWidget(self._getChildName(i), w); } else {