diff --git a/apps/presentationeditor/main/app/template/ImageSettings.template b/apps/presentationeditor/main/app/template/ImageSettings.template index 558f0b94b..75032587c 100644 --- a/apps/presentationeditor/main/app/template/ImageSettings.template +++ b/apps/presentationeditor/main/app/template/ImageSettings.template @@ -17,6 +17,11 @@ + + + + +
diff --git a/apps/presentationeditor/main/app/view/ImageSettings.js b/apps/presentationeditor/main/app/view/ImageSettings.js index e45f14888..439bced4d 100644 --- a/apps/presentationeditor/main/app/view/ImageSettings.js +++ b/apps/presentationeditor/main/app/view/ImageSettings.js @@ -176,6 +176,12 @@ define([ this.btnCrop.menu.on('item:click', _.bind(this.onCropMenu, this)); this.lockedControls.push(this.btnCrop); + this.btnFitSlide = new Common.UI.Button({ + el: $('#image-button-fit-slide') + }); + this.lockedControls.push(this.btnFitSlide); + this.btnFitSlide.on('click', _.bind(this.setFitSlide, this)); + this.btnRotate270 = new Common.UI.Button({ cls: 'btn-toolbar', iconCls: 'rotate-270', @@ -378,6 +384,11 @@ define([ this.fireEvent('editcomplete', this); }, + setFitSlide: function() { + this.api && this.api.asc_FitImagesToSlide(); + this.fireEvent('editcomplete', this); + }, + onBtnRotateClick: function(btn) { var properties = new Asc.asc_CImgProperty(); properties.asc_putRotAdd((btn.options.value==1 ? 90 : 270) * 3.14159265358979 / 180); @@ -431,7 +442,8 @@ define([ textHintFlipH: 'Flip Horizontally', textCrop: 'Crop', textCropFill: 'Fill', - textCropFit: 'Fit' + textCropFit: 'Fit', + textFitSlide: 'Fit to Slide' }, PE.Views.ImageSettings || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 16fd1f43d..bedcf8fbc 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1244,6 +1244,7 @@ "PE.Views.ImageSettings.textCropFit": "Fit", "PE.Views.ImageSettings.textEdit": "Edit", "PE.Views.ImageSettings.textEditObject": "Edit Object", + "PE.Views.ImageSettings.textFitSlide": "Fit to Slide", "PE.Views.ImageSettings.textFlip": "Flip", "PE.Views.ImageSettings.textFromFile": "From File", "PE.Views.ImageSettings.textFromUrl": "From URL",