[DE] Disable toolbar buttons for smart arts
This commit is contained in:
parent
ff557965c7
commit
c1978e567e
|
@ -129,7 +129,8 @@ define([
|
|||
for (var i in objects) {
|
||||
type = objects[i].get_ObjectType();
|
||||
if ( type === Asc.c_oAscTypeSelectElement.Image ) {
|
||||
var props = objects[i].get_ObjectValue();
|
||||
var props = objects[i].get_ObjectValue(),
|
||||
shapeProps = props.get_ShapeProperties();
|
||||
var islocked = props.get_Locked();
|
||||
var notflow = !props.get_CanBeFlow();
|
||||
|
||||
|
@ -147,7 +148,7 @@ define([
|
|||
|
||||
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
|
||||
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
|
||||
disable.arrange = (wrapping == Asc.c_oAscWrapStyle2.Inline) && !props.get_FromGroup() || content_locked;
|
||||
disable.arrange = (wrapping == Asc.c_oAscWrapStyle2.Inline) && !props.get_FromGroup() || shapeProps && shapeProps.asc_getFromSmartArtInternal() || content_locked;
|
||||
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon()) || content_locked || (!!control_props && control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture);
|
||||
|
||||
if ( !disable.group ) {
|
||||
|
|
|
@ -744,6 +744,7 @@ define([
|
|||
enable_dropcap = undefined,
|
||||
disable_dropcapadv = true,
|
||||
frame_pr = undefined,
|
||||
shape_pr = undefined,
|
||||
toolbar = this.toolbar,
|
||||
in_header = false,
|
||||
in_chart = false,
|
||||
|
@ -772,6 +773,8 @@ define([
|
|||
image_locked = pr.get_Locked();
|
||||
if (pr && pr.get_ChartProperties())
|
||||
in_chart = true;
|
||||
if (pr && pr.get_ShapeProperties())
|
||||
shape_pr = pr.get_ShapeProperties();
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||
in_equation = true;
|
||||
if (Asc.c_oAscMathInterfaceType.Common === pr.get_Type())
|
||||
|
@ -819,7 +822,7 @@ define([
|
|||
toolbar.btnContentControls.menu.items[10].setDisabled(!in_control || if_form);
|
||||
}
|
||||
|
||||
var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock;
|
||||
var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock || shape_pr && (shape_pr.asc_getFromSmartArt() || shape_pr.asc_getFromSmartArtInternal());
|
||||
if (this._state.textonlycontrolsdisable != need_text_disable) {
|
||||
if (this._state.activated) this._state.textonlycontrolsdisable = need_text_disable;
|
||||
if (!need_disable) {
|
||||
|
|
Loading…
Reference in a new issue