[SSE] Fix Bug 33478.
This commit is contained in:
parent
58b7bd5136
commit
866ef756e8
|
|
@ -59,7 +59,8 @@ define([
|
||||||
enableKeyEvents : false,
|
enableKeyEvents : false,
|
||||||
beforeOpenHandler : null,
|
beforeOpenHandler : null,
|
||||||
additionalMenuItems : null,
|
additionalMenuItems : null,
|
||||||
showLast: true
|
showLast: true,
|
||||||
|
minWidth: -1
|
||||||
},
|
},
|
||||||
|
|
||||||
template: _.template([
|
template: _.template([
|
||||||
|
|
@ -86,6 +87,7 @@ define([
|
||||||
this.rootHeight = 0;
|
this.rootHeight = 0;
|
||||||
this.rendered = false;
|
this.rendered = false;
|
||||||
this.needFillComboView = false;
|
this.needFillComboView = false;
|
||||||
|
this.minWidth = this.options.minWidth;
|
||||||
|
|
||||||
this.fieldPicker = new Common.UI.DataView({
|
this.fieldPicker = new Common.UI.DataView({
|
||||||
cls: 'field-picker',
|
cls: 'field-picker',
|
||||||
|
|
@ -215,6 +217,8 @@ define([
|
||||||
width = this.cmpEl.width(),
|
width = this.cmpEl.width(),
|
||||||
height = this.cmpEl.height();
|
height = this.cmpEl.height();
|
||||||
|
|
||||||
|
if (width < this.minWidth) return;
|
||||||
|
|
||||||
if (this.rootWidth != width || this.rootHeight != height) {
|
if (this.rootWidth != width || this.rootHeight != height) {
|
||||||
this.rootWidth = width;
|
this.rootWidth = width;
|
||||||
this.rootHeight = height;
|
this.rootHeight = height;
|
||||||
|
|
@ -420,7 +424,7 @@ define([
|
||||||
|
|
||||||
var indexRec = store.indexOf(record),
|
var indexRec = store.indexOf(record),
|
||||||
countRec = store.length,
|
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))),
|
(me.itemBorderLeft || 0) + (me.itemBorderRight || 0))),
|
||||||
newStyles = [];
|
newStyles = [];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -925,6 +925,7 @@ define([
|
||||||
{
|
{
|
||||||
chartSettings: props,
|
chartSettings: props,
|
||||||
imageSettings: (me.isChart) ? me._originalProps : null,
|
imageSettings: (me.isChart) ? me._originalProps : null,
|
||||||
|
sparklineStyles: me.sparklineStyles,
|
||||||
isChart: me.isChart,
|
isChart: me.isChart,
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
|
|
@ -1109,6 +1110,7 @@ define([
|
||||||
if (styles && styles.length>1){
|
if (styles && styles.length>1){
|
||||||
var stylesStore = this.cmbSparkStyle.menuPicker.store,
|
var stylesStore = this.cmbSparkStyle.menuPicker.store,
|
||||||
selectedIdx = styles[styles.length-1];
|
selectedIdx = styles[styles.length-1];
|
||||||
|
this.sparklineStyles = styles;
|
||||||
if (stylesStore.length == styles.length-1) {
|
if (stylesStore.length == styles.length-1) {
|
||||||
var data = stylesStore.models;
|
var data = stylesStore.models;
|
||||||
for (var i=0; i<styles.length-1; i++) {
|
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.api = this.options.api;
|
||||||
this.chartSettings = this.options.chartSettings;
|
this.chartSettings = this.options.chartSettings;
|
||||||
this.imageSettings = this.options.imageSettings;
|
this.imageSettings = this.options.imageSettings;
|
||||||
|
this.sparklineStyles = this.options.sparklineStyles;
|
||||||
this.isChart = this.options.isChart;
|
this.isChart = this.options.isChart;
|
||||||
this.vertAxisProps = null;
|
this.vertAxisProps = null;
|
||||||
this.horAxisProps = null;
|
this.horAxisProps = null;
|
||||||
|
|
@ -819,7 +820,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
itemHeight: 50,
|
itemHeight: 50,
|
||||||
menuMaxHeight: 272,
|
menuMaxHeight: 272,
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
cls: 'combo-spark-style'
|
cls: 'combo-spark-style',
|
||||||
|
minWidth: 190
|
||||||
});
|
});
|
||||||
this.cmbSparkStyle.render($('#spark-dlg-combo-style'));
|
this.cmbSparkStyle.render($('#spark-dlg-combo-style'));
|
||||||
this.cmbSparkStyle.openButton.menu.cmpEl.css({
|
this.cmbSparkStyle.openButton.menu.cmpEl.css({
|
||||||
|
|
@ -1383,7 +1385,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
if (record)
|
if (record)
|
||||||
this.btnSparkType.setIconCls('item-chartlist ' + record.get('iconCls'));
|
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)
|
if (this._state.SparkType !== Asc.c_oAscSparklineType.Line)
|
||||||
this._arrEmptyCells.pop();
|
this._arrEmptyCells.pop();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue