|
@@ -121,7 +121,7 @@ export default class ColorTableView extends View {
|
|
|
* @readonly
|
|
* @readonly
|
|
|
* @member {module:ui/colorgrid/colorgrid~ColorGridView}
|
|
* @member {module:ui/colorgrid/colorgrid~ColorGridView}
|
|
|
*/
|
|
*/
|
|
|
- this.staticColorsGrid = this._createStaticColorsGrid();
|
|
|
|
|
|
|
+ this.staticColorsGrid;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Preserves the reference to {@link module:ui/colorgrid/colorgrid~ColorGridView} used to create
|
|
* Preserves the reference to {@link module:ui/colorgrid/colorgrid~ColorGridView} used to create
|
|
@@ -164,14 +164,25 @@ export default class ColorTableView extends View {
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
this.items.add( this._removeColorButton() );
|
|
this.items.add( this._removeColorButton() );
|
|
|
|
|
+
|
|
|
|
|
+ this._documentColorsCount = documentColorsCount;
|
|
|
|
|
+ this._documentColorsLabel = documentColorsLabel;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ renderGrids() {
|
|
|
|
|
+ if ( this.staticColorsGrid ) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.staticColorsGrid = this._createStaticColorsGrid();
|
|
|
|
|
+
|
|
|
this.items.add( this.staticColorsGrid );
|
|
this.items.add( this.staticColorsGrid );
|
|
|
|
|
|
|
|
- if ( documentColorsCount ) {
|
|
|
|
|
|
|
+ if ( this._documentColorsCount ) {
|
|
|
// Create a label for document colors.
|
|
// Create a label for document colors.
|
|
|
const bind = Template.bind( this.documentColors, this.documentColors );
|
|
const bind = Template.bind( this.documentColors, this.documentColors );
|
|
|
const label = new LabelView( this.locale );
|
|
const label = new LabelView( this.locale );
|
|
|
-
|
|
|
|
|
- label.text = documentColorsLabel;
|
|
|
|
|
|
|
+ label.text = this._documentColorsLabel;
|
|
|
label.extendTemplate( {
|
|
label.extendTemplate( {
|
|
|
attributes: {
|
|
attributes: {
|
|
|
class: [
|
|
class: [
|
|
@@ -181,9 +192,7 @@ export default class ColorTableView extends View {
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
} );
|
|
} );
|
|
|
-
|
|
|
|
|
this.items.add( label );
|
|
this.items.add( label );
|
|
|
-
|
|
|
|
|
this.documentColorsGrid = this._createDocumentColorsGrid();
|
|
this.documentColorsGrid = this._createDocumentColorsGrid();
|
|
|
this.items.add( this.documentColorsGrid );
|
|
this.items.add( this.documentColorsGrid );
|
|
|
}
|
|
}
|