[PE] Fix some emphasis effects (don't add, show applied effect only)

This commit is contained in:
Julia Radzhabova 2022-03-25 17:47:17 +03:00
parent 69c6e33e37
commit 614fafae5f
3 changed files with 10 additions and 0 deletions

View file

@ -915,9 +915,11 @@ define(function(){ 'use strict';
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_WHIP, displayValue: this.textWhip}, {group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_WHIP, displayValue: this.textWhip},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FILL_COLOR, displayValue: this.textFillColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FILL_COLOR, displayValue: this.textFillColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_GROW_SHRINK, displayValue: this.textGrowShrink}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_GROW_SHRINK, displayValue: this.textGrowShrink},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FONT_COLOR, displayValue: this.textFontColor, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_LINE_COLOR, displayValue: this.textLineColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_LINE_COLOR, displayValue: this.textLineColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_SPIN, displayValue: this.textSpin}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_SPIN, displayValue: this.textSpin},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_TRANSPARENCY, displayValue: this.textTransparency}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_TRANSPARENCY, displayValue: this.textTransparency},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BOLD_FLASH, displayValue: this.textBoldFlash, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, displayValue: this.textComplementaryColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, displayValue: this.textComplementaryColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR_2, displayValue: this.textComplementaryColor2}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR_2, displayValue: this.textComplementaryColor2},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_COLOR, displayValue: this.textContrastingColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_COLOR, displayValue: this.textContrastingColor},
@ -926,11 +928,15 @@ define(function(){ 'use strict';
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_LIGHTEN, displayValue: this.textLighten}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_LIGHTEN, displayValue: this.textLighten},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_OBJECT_COLOR, displayValue: this.textObjectColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_OBJECT_COLOR, displayValue: this.textObjectColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_PULSE, displayValue: this.textPulse}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_PULSE, displayValue: this.textPulse},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_UNDERLINE, displayValue: this.textUnderline, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BRUSH_COLOR, displayValue: this.textBrushColor, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_COLOR_PULSE, displayValue: this.textColorPulse}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_COLOR_PULSE, displayValue: this.textColorPulse},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_GROW_WITH_COLOR, displayValue: this.textGrowWithColor}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_GROW_WITH_COLOR, displayValue: this.textGrowWithColor},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_SHIMMER, displayValue: this.textShimmer}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_SHIMMER, displayValue: this.textShimmer},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_TEETER, displayValue: this.textTeeter}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_TEETER, displayValue: this.textTeeter},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BLINK, displayValue: this.textBlink}, {group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BLINK, displayValue: this.textBlink},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BOLD_REVEAL, displayValue: this.textBoldReveal, notsupported: true},
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_WAVE, displayValue: this.textWave, notsupported: true},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BLINDS, displayValue: this.textBlinds}, {group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BLINDS, displayValue: this.textBlinds},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BOX, displayValue: this.textBox, familyEffect: 'shape'}, {group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BOX, displayValue: this.textBox, familyEffect: 'shape'},
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CHECKERBOARD, displayValue: this.textCheckerboard}, {group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CHECKERBOARD, displayValue: this.textCheckerboard},

View file

@ -417,6 +417,7 @@ define([
value: this._state.Effect, value: this._state.Effect,
iconCls: group.get('iconClsCustom'), iconCls: group.get('iconClsCustom'),
displayValue: rec ? rec.displayValue : '', displayValue: rec ? rec.displayValue : '',
tip: rec ? rec.displayValue : '',
isCustom: true isCustom: true
}), {at:index+1}); }), {at:index+1});
view.listEffects.selectRecord(item); view.listEffects.selectRecord(item);

View file

@ -170,6 +170,9 @@ define([
fillEffect: function () { fillEffect: function () {
var arr = _.where(this.allEffects, {group: this._state.activeGroup, level: this.activeLevel }); var arr = _.where(this.allEffects, {group: this._state.activeGroup, level: this.activeLevel });
arr = _.reject(arr, function (item) {
return !!item.notsupported;
});
this.lstEffectList.store.reset(arr); this.lstEffectList.store.reset(arr);
var item = this.lstEffectList.store.findWhere({value: this._state.activeEffect}); var item = this.lstEffectList.store.findWhere({value: this._state.activeEffect});
if(!item) if(!item)