fix: placeholder uninsert when missed

This commit is contained in:
nikita_bartoshuk
2025-06-05 17:00:26 +03:00
parent 5b0b67b132
commit 7ba0da4615

View File

@ -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;