diff --git a/apps/presentationeditor/main/app/controller/SlideMasterTab.js b/apps/presentationeditor/main/app/controller/SlideMasterTab.js index 151b26a234..4b64302899 100644 --- a/apps/presentationeditor/main/app/controller/SlideMasterTab.js +++ b/apps/presentationeditor/main/app/controller/SlideMasterTab.js @@ -68,7 +68,7 @@ define([ if (me.view.btnInsertPlaceholder.pressed && me.view.btnInsertPlaceholder.id !== btn_id) { me._isAddingShape = false; - + me._addAutoshape(false); me.view.btnInsertPlaceholder.toggle(false, true); Common.NotificationCenter.trigger('edit:complete', me.view); } @@ -117,6 +117,18 @@ define([ }); }, + _addAutoshape: function(isstart, type) { + if (this.api) { + if (isstart) { + this.api.StartAddShape(type, true); + $(document.body).on('mouseup', this.checkInsertAutoshape); + } else { + this.api.StartAddShape('', false); + $(document.body).off('mouseup', this.checkInsertAutoshape); + } + } + }, + onApiFocusObject: function(selectedObjects) { var in_slide_master = false; var i = -1, type, pr;