[SSE] Fix insert function icon for scaling 250

This commit is contained in:
JuliaSvinareva
2023-05-19 16:05:06 +03:00
parent 2cd532071c
commit b89480ab6f

View File

@ -84,6 +84,11 @@ define([
title : this.tipFormula,
placement : 'cursor'
});
this.$btnfunc.attr('ratio', 'ratio');
this.applyScaling(Common.UI.Scaling.currentRatio());
this.$btnfunc.on('app:scaling', function (e, info) {
me.applyScaling(info.ratio);
});
return this;
},
@ -99,6 +104,14 @@ define([
this.btnNamedRanges.setDisabled(disabled);
},
applyScaling: function (ratio) {
if (ratio > 2 && !this.$btnfunc.find('svg.icon').length) {
var icon_name = 'btn-function',
svg_icon = '<svg class="icon"><use class="zoom-int" href="#%iconname"></use></svg>'.replace('%iconname', icon_name);
this.$btnfunc.find('i.icon').after(svg_icon);
}
},
tipFormula: 'Insert Function',
textManager: 'Manager'
}, SSE.Views.CellEditor || {}));