diff --git a/apps/documenteditor/mobile/app/controller/edit/EditShape.js b/apps/documenteditor/mobile/app/controller/edit/EditShape.js index 0382a0f5b..171396166 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditShape.js @@ -227,7 +227,8 @@ define([ $('#edit-shape-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)); // Init style opacity - $('#edit-shape-effect input').val([shapeProperties.get_fill().asc_getTransparent() ? shapeProperties.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = shapeProperties.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js index 78015826a..aa22af261 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditShape.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditShape.js @@ -160,7 +160,8 @@ define([ $('#edit-shape-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt)); // Init style opacity - $('#edit-shape-effect input').val([_shapeObject.get_fill().asc_getTransparent() ? _shapeObject.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = _shapeObject.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me)); diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js index a6e1f2d74..36e00f871 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditShape.js @@ -188,7 +188,8 @@ define([ // Effect // Init style opacity - $('#edit-shape-effect input').val([shapeProperties.get_fill().asc_getTransparent() ? shapeProperties.get_fill().asc_getTransparent() / 2.55 : 100]); + var transparent = shapeProperties.get_fill().asc_getTransparent(); + $('#edit-shape-effect input').val([transparent!==null && transparent!==undefined ? transparent / 2.55 : 100]); $('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%"); $('#edit-shape-effect input').single('change touchend', _.buffered(me.onOpacity, 100, me)); $('#edit-shape-effect input').single('input', _.bind(me.onOpacityChanging, me));