[SSE] Fix 3d rotation settings

This commit is contained in:
Julia Radzhabova 2022-09-07 23:58:22 +03:00
parent d824f9dd61
commit b8419707bf
4 changed files with 49 additions and 24 deletions

View file

@ -23,6 +23,12 @@ label {
opacity: @component-disabled-opacity-ie;
opacity: @component-disabled-opacity;
}
&.fixed {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.menu-shapes {

View file

@ -59,7 +59,7 @@
</tr>
<tr>
<td class="padding-small">
<label style="margin-top: 3px;"><%= scope.textX %></label>
<label class="fixed" style="margin-top: 3px;width: 88px;"><%= scope.textX %></label>
<div id="chart-btn-x-right" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-btn-x-left" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-spin-x" style="display: inline-block; float:right;"></div>
@ -67,7 +67,7 @@
</tr>
<tr>
<td class="padding-small">
<label style="margin-top: 3px;"><%= scope.textY %></label>
<label class="fixed" style="margin-top: 3px;width: 88px;"><%= scope.textY %></label>
<div id="chart-btn-y-down" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-btn-y-up" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-spin-y" style="display: inline-block; float:right;"></div>
@ -75,7 +75,7 @@
</tr>
<tr>
<td class="padding-small">
<label style="margin-top: 3px;"><%= scope.textPerspective %></label>
<label class="fixed" style="margin-top: 3px;width: 88px;"><%= scope.textPerspective %></label>
<div id="chart-btn-widen" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-btn-narrow" style="display: inline-block; float:right; margin-left: 4px;"></div>
<div id="chart-spin-persp" style="display: inline-block; float:right;"></div>
@ -93,13 +93,13 @@
</tr>
<tr>
<td class="padding-small">
<label style="margin-top: 3px;"><%= scope.text3dDepth %></label>
<label class="fixed" style="margin-top: 3px;width: 122px;"><%= scope.text3dDepth %></label>
<div id="chart-spin-3d-depth" style="display: inline-block; float:right;"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<label style="margin-top: 3px;"><%= scope.text3dHeight %></label>
<label class="fixed" style="margin-top: 3px;width: 122px;"><%= scope.text3dHeight %></label>
<div id="chart-spin-3d-height" style="display: inline-block; float:right;"></div>
</td>
</tr>

View file

@ -216,7 +216,7 @@ define([
}
var series = chartSettings ? chartSettings.getSeries() : null;
this.btnSwitch.setDisabled(!series || series.length<1 || !chartSettings || !chartSettings.getRange());
this.btnSwitch.setDisabled(this._locked || !series || series.length<1 || !chartSettings || !chartSettings.getRange());
if (props3d) {
value = props3d.asc_getRotX();
@ -233,19 +233,23 @@ define([
this._state.Y = value;
}
value = props3d.asc_getPerspective();
if ( (this._state.Perspective===undefined || value===undefined)&&(this._state.Perspective!==value) ||
Math.abs(this._state.Perspective-value)>0.001) {
this.spnPerspective.setValue((value!==null && value !== undefined) ? value : '', true);
this._state.Perspective = value;
}
value = props3d.asc_getRightAngleAxes();
if ( this._state.RightAngle!==value ) {
this.chRightAngle.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true);
this._state.RightAngle=point;
this._state.RightAngle=value;
}
value = props3d.asc_getPerspective();
if ( (this._state.Perspective===undefined || value===undefined)&&(this._state.Perspective!==value) ||
Math.abs(this._state.Perspective-value)>0.001) {
this.spnPerspective.setMinValue((value!==null && value !== undefined) ? 0.1 : 0);
this.spnPerspective.setValue((value!==null && value !== undefined) ? value : 0, true);
this._state.Perspective = value;
}
this.spnPerspective.setDisabled(this._locked || !!this._state.RightAngle);
this.btnNarrow.setDisabled(this._locked || !!this._state.RightAngle);
this.btnWiden.setDisabled(this._locked || !!this._state.RightAngle);
value = props3d.asc_getDepth();
if ( Math.abs(this._state.Depth-value)>0.001 ||
(this._state.Depth===undefined || value===undefined)&&(this._state.Depth!==value)) {
@ -258,9 +262,9 @@ define([
(this._state.Height3d===undefined || this._state.Height3d===null || value===null)&&(this._state.Height3d!==value)) {
(value!==null) && this.spn3DHeight.setValue(value, true);
this.chAutoscale.setValue(value===null, true);
this.spn3DHeight.setDisabled(value===null);
this._state.Height3d = value;
}
this.spn3DHeight.setDisabled(this._locked || value===null);
}
} else { //sparkline
this._originalProps = props;
@ -831,7 +835,7 @@ define([
this.spnX = new Common.UI.MetricSpinner({
el: $('#chart-spin-x'),
step: 10,
width: 45,
width: 57,
defaultUnit : "°",
value: '20 °',
maxValue: 359.9,
@ -873,7 +877,7 @@ define([
this.spnY = new Common.UI.MetricSpinner({
el: $('#chart-spin-y'),
step: 10,
width: 45,
width: 57,
defaultUnit : "°",
value: '15 °',
maxValue: 90,
@ -896,7 +900,7 @@ define([
});
this.lockedControls.push(this.btnUp);
this.btnUp.on('click', _.bind(function() {
this.spnY.setValue(this.spnY.getNumberValue() + 10);
this.spnY.setValue(this.spnY.getNumberValue() - 10);
}, this));
this.btnDown= new Common.UI.Button({
@ -915,7 +919,7 @@ define([
this.spnPerspective = new Common.UI.MetricSpinner({
el: $('#chart-spin-persp'),
step: 5,
width: 45,
width: 57,
defaultUnit : "°",
value: '0 °',
maxValue: 100,
@ -938,7 +942,7 @@ define([
});
this.lockedControls.push(this.btnNarrow);
this.btnNarrow.on('click', _.bind(function() {
this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5);
this.spnPerspective.setValue(this.spnPerspective.getNumberValue() - 5);
}, this));
this.btnWiden= new Common.UI.Button({
@ -997,7 +1001,7 @@ define([
this.spn3DDepth = new Common.UI.MetricSpinner({
el: $('#chart-spin-3d-depth'),
step: 10,
width: 78,
width: 70,
defaultUnit : "%",
value: '0 %',
maxValue: 2000,
@ -1013,7 +1017,7 @@ define([
this.spn3DHeight = new Common.UI.MetricSpinner({
el: $('#chart-spin-3d-height'),
step: 10,
width: 78,
width: 70,
defaultUnit : "%",
value: '50 %',
maxValue: 500,
@ -1688,8 +1692,8 @@ define([
textX: 'X rotation',
textY: 'Y rotation',
textPerspective: 'Perspective',
text3dDepth: 'Depth',
text3dHeight: 'Height',
text3dDepth: 'Depth (% of base)',
text3dHeight: 'Height (% of base)',
textLeft: 'Left',
textRight: 'Right',
textUp: 'Up',

View file

@ -1661,6 +1661,21 @@
"SSE.Views.ChartSettings.textSwitch": "Switch Row/Column",
"SSE.Views.ChartSettings.textType": "Type",
"SSE.Views.ChartSettings.textWidth": "Width",
"SSE.Views.ChartSettings.text3dRotation": "3D Rotation",
"SSE.Views.ChartSettings.textX": "X rotation",
"SSE.Views.ChartSettings.textY": "Y rotation",
"SSE.Views.ChartSettings.textPerspective": "Perspective",
"SSE.Views.ChartSettings.text3dDepth": "Depth (% of base)",
"SSE.Views.ChartSettings.text3dHeight": "Height (% of base)",
"SSE.Views.ChartSettings.textLeft": "Left",
"SSE.Views.ChartSettings.textRight": "Right",
"SSE.Views.ChartSettings.textUp": "Up",
"SSE.Views.ChartSettings.textDown": "Down",
"SSE.Views.ChartSettings.textNarrow": "Narrow field of view",
"SSE.Views.ChartSettings.textWiden": "Widen field of view",
"SSE.Views.ChartSettings.textRightAngle": "Right Angle Axes",
"SSE.Views.ChartSettings.textAutoscale": "Autoscale",
"SSE.Views.ChartSettings.textDefault": "Default Rotation",
"SSE.Views.ChartSettingsDlg.errorMaxPoints": "ERROR! The maximum number of points in series per chart is 4096.",
"SSE.Views.ChartSettingsDlg.errorMaxRows": "ERROR! The maximum number of data series per chart is 255",
"SSE.Views.ChartSettingsDlg.errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:<br> opening price, max price, min price, closing price.",