From 731619473e97b97c06eb3e0b765c5ce6e0f8545e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 8 Jun 2018 17:51:40 +0300 Subject: [PATCH] [SSE] Allow decimal values for column width --- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 1 + apps/spreadsheeteditor/main/app/view/SetValueDialog.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 2d032a019..9c4903b39 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -537,6 +537,7 @@ define([ startvalue: item.value == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(), maxvalue: item.value == 'row-height' ? Asc.c_oAscMaxRowHeight : Asc.c_oAscMaxColumnWidth, step: item.value == 'row-height' ? 0.75 : 1, + rounding: (item.value == 'row-height'), defaultUnit: item.value == 'row-height' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym, handler: function(dlg, result) { if (result == 'ok') { diff --git a/apps/spreadsheeteditor/main/app/view/SetValueDialog.js b/apps/spreadsheeteditor/main/app/view/SetValueDialog.js index 9dc0ba0cd..87e54b0b6 100644 --- a/apps/spreadsheeteditor/main/app/view/SetValueDialog.js +++ b/apps/spreadsheeteditor/main/app/view/SetValueDialog.js @@ -105,7 +105,8 @@ define([ var $window = this.getChild(); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); this.spnSize.on('entervalue', _.bind(this.onPrimary, this)); - this.spnSize.on('change', _.bind(this.onChange, this)); + if (this.options.rounding) + this.spnSize.on('change', _.bind(this.onChange, this)); this.spnSize.$el.find('input').focus(); },