mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 12:18:47 +08:00
fix: placeholder uninsert when missed
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user