[DE] Hide controls for smart arts in right panel
This commit is contained in:
parent
d81ed7c041
commit
d6920073de
|
@ -142,17 +142,17 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="shape-only">
|
<tr class="shape-only shape-rotation">
|
||||||
<td class="padding-small">
|
<td class="padding-small">
|
||||||
<div class="separator horizontal"></div>
|
<div class="separator horizontal"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="shape-only">
|
<tr class="shape-only shape-rotation">
|
||||||
<td class="padding-small">
|
<td class="padding-small">
|
||||||
<label class="header"><%= scope.textRotation %></label>
|
<label class="header"><%= scope.textRotation %></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="shape-only">
|
<tr class="shape-only shape-rotation">
|
||||||
<td>
|
<td>
|
||||||
<table cols="2" style="width: 100%;">
|
<table cols="2" style="width: 100%;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -120,17 +120,17 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="textart-transform">
|
||||||
<td class="padding-small">
|
<td class="padding-small">
|
||||||
<div class="separator horizontal"></div>
|
<div class="separator horizontal"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="textart-transform">
|
||||||
<td>
|
<td>
|
||||||
<label class="header"><%= scope.textTransform %></label>
|
<label class="header"><%= scope.textTransform %></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="textart-transform">
|
||||||
<td class="padding-small">
|
<td class="padding-small">
|
||||||
<div class="" id="textart-combo-transform" style="width: 100%; height: 42px;"></div>
|
<div class="" id="textart-combo-transform" style="width: 100%; height: 42px;"></div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -102,7 +102,9 @@ define([
|
||||||
DisabledControls: false,
|
DisabledControls: false,
|
||||||
HideShapeOnlySettings: false,
|
HideShapeOnlySettings: false,
|
||||||
HideChangeTypeSettings: false,
|
HideChangeTypeSettings: false,
|
||||||
isFromImage: false
|
HideRotationSettings: false,
|
||||||
|
isFromImage: false,
|
||||||
|
isFromSmartArtInternal: false
|
||||||
};
|
};
|
||||||
this.lockedControls = [];
|
this.lockedControls = [];
|
||||||
this._locked = false;
|
this._locked = false;
|
||||||
|
@ -144,6 +146,7 @@ define([
|
||||||
this.TransparencyContainer = $('#shape-panel-transparent-fill');
|
this.TransparencyContainer = $('#shape-panel-transparent-fill');
|
||||||
this.ShapeOnlySettings = $('.shape-only');
|
this.ShapeOnlySettings = $('.shape-only');
|
||||||
this.CanChangeType = $('.change-type');
|
this.CanChangeType = $('.change-type');
|
||||||
|
this.RotationSettings = $('.shape-rotation');
|
||||||
},
|
},
|
||||||
|
|
||||||
setApi: function(api) {
|
setApi: function(api) {
|
||||||
|
@ -804,16 +807,18 @@ define([
|
||||||
|
|
||||||
this.disableControls(this._locked, !shapeprops.get_CanFill());
|
this.disableControls(this._locked, !shapeprops.get_CanFill());
|
||||||
this.hideShapeOnlySettings(shapeprops.get_FromChart() || shapeprops.get_FromImage());
|
this.hideShapeOnlySettings(shapeprops.get_FromChart() || shapeprops.get_FromImage());
|
||||||
|
this.hideRotationSettings(shapeprops.get_FromSmartArt());
|
||||||
|
|
||||||
var hidechangetype = shapeprops.get_FromChart() || shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
|
var hidechangetype = shapeprops.get_FromChart() || shapeprops.get_FromSmartArt() || shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
|
||||||
|| shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
|
|| shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2'
|
||||||
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
||||||
|| shapetype=='straightConnector1';
|
|| shapetype=='straightConnector1';
|
||||||
this.hideChangeTypeSettings(hidechangetype);
|
this.hideChangeTypeSettings(hidechangetype);
|
||||||
this._state.isFromImage = !!shapeprops.get_FromImage();
|
this._state.isFromImage = !!shapeprops.get_FromImage();
|
||||||
|
this._state.isFromSmartArtInternal = !!shapeprops.get_FromSmartArtInternal();
|
||||||
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
||||||
this.btnChangeShape.menu.items[0].setVisible(shapeprops.get_FromImage());
|
this.btnChangeShape.menu.items[0].setVisible(shapeprops.get_FromImage() || shapeprops.get_FromSmartArtInternal());
|
||||||
this.btnChangeShape.menu.items[1].setVisible(!shapeprops.get_FromImage());
|
this.btnChangeShape.menu.items[1].setVisible(!shapeprops.get_FromImage() && !shapeprops.get_FromSmartArtInternal());
|
||||||
}
|
}
|
||||||
|
|
||||||
var value = props.get_WrappingStyle();
|
var value = props.get_WrappingStyle();
|
||||||
|
@ -1845,8 +1850,8 @@ define([
|
||||||
me.btnChangeShape.menu.hide();
|
me.btnChangeShape.menu.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
me.btnChangeShape.menu.items[0].setVisible(me._state.isFromImage);
|
me.btnChangeShape.menu.items[0].setVisible(me._state.isFromImage || me._state.isFromSmartArtInternal);
|
||||||
me.btnChangeShape.menu.items[1].setVisible(!me._state.isFromImage);
|
me.btnChangeShape.menu.items[1].setVisible(!me._state.isFromImage && !me._state.isFromSmartArtInternal);
|
||||||
},
|
},
|
||||||
|
|
||||||
UpdateThemeColors: function() {
|
UpdateThemeColors: function() {
|
||||||
|
@ -1976,6 +1981,13 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideRotationSettings: function(value) {
|
||||||
|
if (this._state.HideRotationSettings !== value) {
|
||||||
|
this._state.HideRotationSettings = value;
|
||||||
|
this.RotationSettings.toggleClass('hidden', value==true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onPositionChange: function(btn) {
|
onPositionChange: function(btn) {
|
||||||
var pos = btn.getNumberValue(),
|
var pos = btn.getNumberValue(),
|
||||||
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
|
||||||
|
|
|
@ -90,7 +90,9 @@ define([
|
||||||
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
|
GradFillType: Asc.c_oAscFillGradType.GRAD_LINEAR,
|
||||||
FormId: null,
|
FormId: null,
|
||||||
DisabledControls: false,
|
DisabledControls: false,
|
||||||
applicationPixelRatio: Common.Utils.applicationPixelRatio()
|
applicationPixelRatio: Common.Utils.applicationPixelRatio(),
|
||||||
|
isFromSmartArtInternal: false,
|
||||||
|
HideTransformSettings: false
|
||||||
};
|
};
|
||||||
this.lockedControls = [];
|
this.lockedControls = [];
|
||||||
this._locked = false;
|
this._locked = false;
|
||||||
|
@ -123,6 +125,8 @@ define([
|
||||||
this.FillGradientContainer = $('#textart-panel-gradient-fill');
|
this.FillGradientContainer = $('#textart-panel-gradient-fill');
|
||||||
this.TransparencyContainer = $('#textart-panel-transparent-fill');
|
this.TransparencyContainer = $('#textart-panel-transparent-fill');
|
||||||
|
|
||||||
|
this.TransformSettings = $('.textart-transform');
|
||||||
|
|
||||||
$(window).on('resize', _.bind(this.onWindowResize, this));
|
$(window).on('resize', _.bind(this.onWindowResize, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -547,6 +551,9 @@ define([
|
||||||
if (this._initSettings)
|
if (this._initSettings)
|
||||||
this.createDelayedElements();
|
this.createDelayedElements();
|
||||||
|
|
||||||
|
this._state.isFromSmartArtInternal = props.get_ShapeProperties() && props.get_ShapeProperties().get_FromSmartArtInternal();
|
||||||
|
this.hideTransformSettings(this._state.isFromSmartArtInternal);
|
||||||
|
|
||||||
if (props && props.get_ShapeProperties() && props.get_ShapeProperties().get_TextArtProperties())
|
if (props && props.get_ShapeProperties() && props.get_ShapeProperties().get_TextArtProperties())
|
||||||
{
|
{
|
||||||
var shapeprops = props.get_ShapeProperties().get_TextArtProperties();
|
var shapeprops = props.get_ShapeProperties().get_TextArtProperties();
|
||||||
|
@ -1344,6 +1351,13 @@ define([
|
||||||
this._state.applicationPixelRatio = Common.Utils.applicationPixelRatio();
|
this._state.applicationPixelRatio = Common.Utils.applicationPixelRatio();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideTransformSettings: function(value) {
|
||||||
|
if (this._state.HideTransformSettings !== value) {
|
||||||
|
this._state.HideTransformSettings = value;
|
||||||
|
this.TransformSettings.toggleClass('hidden', value === true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
txtNoBorders : 'No Line',
|
txtNoBorders : 'No Line',
|
||||||
strStroke : 'Stroke',
|
strStroke : 'Stroke',
|
||||||
strColor : 'Color',
|
strColor : 'Color',
|
||||||
|
|
Loading…
Reference in a new issue