From 174dfd3a5f65eeb580f6f6bd60bfbd918d6e86ee Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 22 Mar 2024 13:27:50 +0300 Subject: [PATCH] [PDFE] Fix textures --- apps/pdfeditor/main/app/controller/Toolbar.js | 5 +++++ apps/pdfeditor/main/app/view/ShapeSettings.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/apps/pdfeditor/main/app/controller/Toolbar.js b/apps/pdfeditor/main/app/controller/Toolbar.js index a5879d0c7c..c325404e78 100644 --- a/apps/pdfeditor/main/app/controller/Toolbar.js +++ b/apps/pdfeditor/main/app/controller/Toolbar.js @@ -337,6 +337,7 @@ define([ if (this.mode.canPDFEdit) { this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onApiMathTypes, this)); + this.api.asc_registerCallback('asc_onInitStandartTextures', _.bind(this.onInitStandartTextures, this)); this.getApplication().getController('Common.Controllers.Fonts').setApi(this.api); } }, @@ -1227,6 +1228,10 @@ define([ this._equationTemp = equation; }, + onInitStandartTextures: function(texture) { + this._textureTemp = texture; + }, + fillFontsStore: function(combo, name) { if (combo.store.length===0) { var fontstore = new Common.Collections.Fonts(), diff --git a/apps/pdfeditor/main/app/view/ShapeSettings.js b/apps/pdfeditor/main/app/view/ShapeSettings.js index cad8d32550..4d929a181d 100644 --- a/apps/pdfeditor/main/app/view/ShapeSettings.js +++ b/apps/pdfeditor/main/app/view/ShapeSettings.js @@ -1887,6 +1887,9 @@ define([ onInitStandartTextures: function(texture) { var me = this; + if ((!texture || texture.length<1) && (!me._texturearray || me._texturearray.length<1)) { + texture = PDFE.getController('Toolbar')._textureTemp; + } if (texture && texture.length>0){ me._texturearray = []; _.each(texture, function(item){