Commit 866ef756 authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Fix Bug 33478.

parent 58b7bd51
......@@ -59,7 +59,8 @@ define([
enableKeyEvents : false,
beforeOpenHandler : null,
additionalMenuItems : null,
showLast: true
showLast: true,
minWidth: -1
},
template: _.template([
......@@ -86,6 +87,7 @@ define([
this.rootHeight = 0;
this.rendered = false;
this.needFillComboView = false;
this.minWidth = this.options.minWidth;
this.fieldPicker = new Common.UI.DataView({
cls: 'field-picker',
......@@ -215,6 +217,8 @@ define([
width = this.cmpEl.width(),
height = this.cmpEl.height();
if (width < this.minWidth) return;
if (this.rootWidth != width || this.rootHeight != height) {
this.rootWidth = width;
this.rootHeight = height;
......@@ -420,7 +424,7 @@ define([
var indexRec = store.indexOf(record),
countRec = store.length,
maxViewCount = Math.floor((fieldPickerEl.width()) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) +
maxViewCount = Math.floor(Math.max(fieldPickerEl.width(), me.minWidth) / (me.itemWidth + (me.itemMarginLeft || 0) + (me.itemMarginRight || 0) + (me.itemPaddingLeft || 0) + (me.itemPaddingRight || 0) +
(me.itemBorderLeft || 0) + (me.itemBorderRight || 0))),
newStyles = [];
......
......@@ -925,6 +925,7 @@ define([
{
chartSettings: props,
imageSettings: (me.isChart) ? me._originalProps : null,
sparklineStyles: me.sparklineStyles,
isChart: me.isChart,
api: me.api,
handler: function(result, value) {
......@@ -1109,6 +1110,7 @@ define([
if (styles && styles.length>1){
var stylesStore = this.cmbSparkStyle.menuPicker.store,
selectedIdx = styles[styles.length-1];
this.sparklineStyles = styles;
if (stylesStore.length == styles.length-1) {
var data = stylesStore.models;
for (var i=0; i<styles.length-1; i++) {
......
......@@ -91,6 +91,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
this.api = this.options.api;
this.chartSettings = this.options.chartSettings;
this.imageSettings = this.options.imageSettings;
this.sparklineStyles = this.options.sparklineStyles;
this.isChart = this.options.isChart;
this.vertAxisProps = null;
this.horAxisProps = null;
......@@ -819,7 +820,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
itemHeight: 50,
menuMaxHeight: 272,
enableKeyEvents: true,
cls: 'combo-spark-style'
cls: 'combo-spark-style',
minWidth: 190
});
this.cmbSparkStyle.render($('#spark-dlg-combo-style'));
this.cmbSparkStyle.openButton.menu.cmpEl.css({
......@@ -1383,7 +1385,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
if (record)
this.btnSparkType.setIconCls('item-chartlist ' + record.get('iconCls'));
this.updateSparkStyles(props.asc_getStyles());
this.updateSparkStyles((this.sparklineStyles) ? this.sparklineStyles : props.asc_getStyles());
if (this._state.SparkType !== Asc.c_oAscSparklineType.Line)
this._arrEmptyCells.pop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment