|
@@ -92,6 +92,7 @@ export default class View {
|
|
|
* @param {module:utils/locale~Locale} [locale] The localization services instance.
|
|
* @param {module:utils/locale~Locale} [locale] The localization services instance.
|
|
|
*/
|
|
*/
|
|
|
constructor( locale ) {
|
|
constructor( locale ) {
|
|
|
|
|
+ // console.log( 'new', this.constructor.name, '()' );
|
|
|
/**
|
|
/**
|
|
|
* An HTML element of the view. `null` until {@link #render rendered}
|
|
* An HTML element of the view. `null` until {@link #render rendered}
|
|
|
* from the {@link #template}.
|
|
* from the {@link #template}.
|
|
@@ -493,6 +494,13 @@ export default class View {
|
|
|
this.stopListening();
|
|
this.stopListening();
|
|
|
|
|
|
|
|
this._viewCollections.map( c => c.destroy() );
|
|
this._viewCollections.map( c => c.destroy() );
|
|
|
|
|
+ this._viewCollections.clear();
|
|
|
|
|
+ this._unboundChildren.clear();
|
|
|
|
|
+
|
|
|
|
|
+ // Template isn't obligatory for views.
|
|
|
|
|
+ if ( this.template && this.template._revertData ) {
|
|
|
|
|
+ this.template.revert( this.element );
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|