From 2c6a2c0993e6a1a9bc27c7c172dc70d6ebcf4f94 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 9 Jul 2020 21:49:35 +0300 Subject: [PATCH] [DE][SSE] Fix add gradient point --- apps/documenteditor/main/app/view/ShapeSettings.js | 1 + apps/documenteditor/main/app/view/TextArtSettings.js | 1 + apps/spreadsheeteditor/main/app/view/CellSettings.js | 1 + apps/spreadsheeteditor/main/app/view/ShapeSettings.js | 1 + apps/spreadsheeteditor/main/app/view/TextArtSettings.js | 1 + 5 files changed, 5 insertions(+) diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 432af65c4..d86b10543 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -1876,6 +1876,7 @@ define([ }, onAddGradientStep: function() { + if (this.GradColor.colors.length > 9) return; var curIndex = this.GradColor.currentIdx; var pos = (this.GradColor.values[curIndex] + this.GradColor.values[curIndex < this.GradColor.colors.length - 1 ? curIndex + 1 : curIndex - 1]) / 2; diff --git a/apps/documenteditor/main/app/view/TextArtSettings.js b/apps/documenteditor/main/app/view/TextArtSettings.js index 7a29bfd4b..e6b03bcbb 100644 --- a/apps/documenteditor/main/app/view/TextArtSettings.js +++ b/apps/documenteditor/main/app/view/TextArtSettings.js @@ -1210,6 +1210,7 @@ define([ }, onAddGradientStep: function() { + if (this.GradColor.colors.length > 9) return; var curIndex = this.GradColor.currentIdx; var pos = (this.GradColor.values[curIndex] + this.GradColor.values[curIndex < this.GradColor.colors.length - 1 ? curIndex + 1 : curIndex - 1]) / 2; diff --git a/apps/spreadsheeteditor/main/app/view/CellSettings.js b/apps/spreadsheeteditor/main/app/view/CellSettings.js index 1f9aac6ad..206f92349 100644 --- a/apps/spreadsheeteditor/main/app/view/CellSettings.js +++ b/apps/spreadsheeteditor/main/app/view/CellSettings.js @@ -1234,6 +1234,7 @@ define([ }, onAddGradientStep: function() { + if (this.GradColor.colors.length > 9) return; var curIndex = this.GradColor.currentIdx; var pos = (this.GradColor.values[curIndex] + this.GradColor.values[curIndex < this.GradColor.colors.length - 1 ? curIndex + 1 : curIndex - 1]) / 2; diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js index 2a83bf776..045dfe57e 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettings.js @@ -1778,6 +1778,7 @@ define([ }, onAddGradientStep: function() { + if (this.GradColor.colors.length > 9) return; var curIndex = this.GradColor.currentIdx; var pos = (this.GradColor.values[curIndex] + this.GradColor.values[curIndex < this.GradColor.colors.length - 1 ? curIndex + 1 : curIndex - 1]) / 2; diff --git a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js index 51ecfef65..cb59f693b 100644 --- a/apps/spreadsheeteditor/main/app/view/TextArtSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TextArtSettings.js @@ -1645,6 +1645,7 @@ define([ }, onAddGradientStep: function() { + if (this.GradColor.colors.length > 9) return; var curIndex = this.GradColor.currentIdx; var pos = (this.GradColor.values[curIndex] + this.GradColor.values[curIndex < this.GradColor.colors.length - 1 ? curIndex + 1 : curIndex - 1]) / 2;