diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 51d9fdb10..3086a5103 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -929,7 +929,7 @@ define([ var me = this; var colors = fill.get_colors(), positions = fill.get_positions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/documenteditor/main/app/view/TextArtSettings.js b/apps/documenteditor/main/app/view/TextArtSettings.js index 89600a6df..9cd76b657 100644 --- a/apps/documenteditor/main/app/view/TextArtSettings.js +++ b/apps/documenteditor/main/app/view/TextArtSettings.js @@ -622,7 +622,7 @@ define([ var me = this; var colors = fill.get_colors(), positions = fill.get_positions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/presentationeditor/main/app/view/ShapeSettings.js b/apps/presentationeditor/main/app/view/ShapeSettings.js index 1c70e7019..c6eed5c4e 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettings.js +++ b/apps/presentationeditor/main/app/view/ShapeSettings.js @@ -842,7 +842,7 @@ define([ var me = this; var colors = fill.get_colors(), positions = fill.get_positions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/presentationeditor/main/app/view/SlideSettings.js b/apps/presentationeditor/main/app/view/SlideSettings.js index a7708b734..695bbc8e7 100644 --- a/apps/presentationeditor/main/app/view/SlideSettings.js +++ b/apps/presentationeditor/main/app/view/SlideSettings.js @@ -1265,7 +1265,7 @@ define([ var me = this; var colors = fill.get_colors(), positions = fill.get_positions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/presentationeditor/main/app/view/TextArtSettings.js b/apps/presentationeditor/main/app/view/TextArtSettings.js index 04a9f738a..6b83ad489 100644 --- a/apps/presentationeditor/main/app/view/TextArtSettings.js +++ b/apps/presentationeditor/main/app/view/TextArtSettings.js @@ -818,7 +818,7 @@ define([ var me = this; var colors = fill.get_colors(), positions = fill.get_positions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index e4a99a742..54616a135 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -866,7 +866,7 @@ define([ var me = this; var colors = fill.asc_getColors(), positions = fill.asc_getPositions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length); diff --git a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js index 9ce20f43e..57762926b 100644 --- a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js @@ -822,7 +822,7 @@ define([ var me = this; var colors = fill.asc_getColors(), positions = fill.asc_getPositions(), - length = colors.length; + length = colors ? colors.length : this.GradColor.colors.length; this.sldrGradient.setThumbs(length); if (this.GradColor.colors.length>length) { this.GradColor.colors.splice(length, this.GradColor.colors.length - length);