From d824f9dd61fde294882bf6c354628294dc8f107e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 7 Sep 2022 15:44:27 +0300 Subject: [PATCH 1/8] [SSE] Add 3d rotation settings for charts --- .../main/app/template/ChartSettings.template | 63 +++ .../main/app/view/ChartSettings.js | 370 +++++++++++++++++- 2 files changed, 427 insertions(+), 6 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/template/ChartSettings.template b/apps/spreadsheeteditor/main/app/template/ChartSettings.template index f4a126bc0..e728e6578 100644 --- a/apps/spreadsheeteditor/main/app/template/ChartSettings.template +++ b/apps/spreadsheeteditor/main/app/template/ChartSettings.template @@ -46,6 +46,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 09cb2c040..2dc82f09b 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -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', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index ba046f651..31a788cf9 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -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:
opening price, max price, min price, closing price.", From 67a0104d7353be62d4fdbfec3ab6cddaaa17d445 Mon Sep 17 00:00:00 2001 From: Kirill Volkov Date: Mon, 12 Sep 2022 15:39:19 +0300 Subject: [PATCH 3/8] add icons add icons 3d rotation --- .../img/toolbar/1.25x/btn-rotate-down.png | Bin 0 -> 173 bytes .../resources/img/toolbar/1.25x/btn-rotate-up.png | Bin 0 -> 174 bytes .../img/toolbar/1.25x/btn-rotate-x-clockwise.png | Bin 0 -> 295 bytes .../1.25x/btn-rotate-x-counterclockwise.png | Bin 0 -> 279 bytes .../img/toolbar/1.25x/btn-rotate-y-clockwise.png | Bin 0 -> 297 bytes .../1.25x/btn-rotate-y-counterclockwise.png | Bin 0 -> 292 bytes .../img/toolbar/1.5x/btn-rotate-down.png | Bin 0 -> 185 bytes .../resources/img/toolbar/1.5x/btn-rotate-up.png | Bin 0 -> 191 bytes .../img/toolbar/1.5x/btn-rotate-x-clockwise.png | Bin 0 -> 320 bytes .../1.5x/btn-rotate-x-counterclockwise.png | Bin 0 -> 338 bytes .../img/toolbar/1.5x/btn-rotate-y-clockwise.png | Bin 0 -> 329 bytes .../1.5x/btn-rotate-y-counterclockwise.png | Bin 0 -> 346 bytes .../img/toolbar/1.75x/btn-rotate-down.png | Bin 0 -> 201 bytes .../resources/img/toolbar/1.75x/btn-rotate-up.png | Bin 0 -> 199 bytes .../img/toolbar/1.75x/btn-rotate-x-clockwise.png | Bin 0 -> 384 bytes .../1.75x/btn-rotate-x-counterclockwise.png | Bin 0 -> 368 bytes .../img/toolbar/1.75x/btn-rotate-y-clockwise.png | Bin 0 -> 392 bytes .../1.75x/btn-rotate-y-counterclockwise.png | Bin 0 -> 390 bytes .../resources/img/toolbar/1x/btn-rotate-down.png | Bin 0 -> 171 bytes .../resources/img/toolbar/1x/btn-rotate-up.png | Bin 0 -> 172 bytes .../img/toolbar/1x/btn-rotate-x-clockwise.png | Bin 0 -> 256 bytes .../toolbar/1x/btn-rotate-x-counterclockwise.png | Bin 0 -> 254 bytes .../img/toolbar/1x/btn-rotate-y-clockwise.png | Bin 0 -> 249 bytes .../toolbar/1x/btn-rotate-y-counterclockwise.png | Bin 0 -> 249 bytes .../resources/img/toolbar/2x/btn-rotate-down.png | Bin 0 -> 274 bytes .../resources/img/toolbar/2x/btn-rotate-up.png | Bin 0 -> 274 bytes .../img/toolbar/2x/btn-rotate-x-clockwise.png | Bin 0 -> 426 bytes .../toolbar/2x/btn-rotate-x-counterclockwise.png | Bin 0 -> 433 bytes .../img/toolbar/2x/btn-rotate-y-clockwise.png | Bin 0 -> 451 bytes .../toolbar/2x/btn-rotate-y-counterclockwise.png | Bin 0 -> 475 bytes 30 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-down.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-up.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-down.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-up.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-y-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-y-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-down.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-up.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-x-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-x-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-y-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-y-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-down.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-up.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-x-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-y-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-y-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-down.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-up.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-x-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-y-clockwise.png create mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-y-counterclockwise.png diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-down.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-down.png new file mode 100644 index 0000000000000000000000000000000000000000..4714ec06de670f1be6fd3b2e8d9d1c52db9eae83 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd!3HFYLuy@sREejHV@SoVw-*m`9#G(M2y{QW zY*(YQW!K^*f?v<;KYY5n z?CpfDx4(FF-0<1I=a=Q*Y7v*5W$|%;V|KgjKh=9N;|R0cW&!K86a~IBCtL(B_U~qB XE$WyR9(nvU(0&F_S3j3^P6 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-up.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-up.png new file mode 100644 index 0000000000000000000000000000000000000000..8d2bd9cf3f11f02f369ab65e9b1b7aa9d9afa38c GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd!3HFYLuy@sRH>(nV@SoVx0es{HYfCu}=1*|d{~)B>+VNtkRrvKSQ)ZT~+qX>E@LJ@ot1S|h<}x#S zIUFCEJZt1|Jk*%Et446i3rjwyTf6prTPgW_?o;Ek{~gjv_Us%23JwhnjGvS_1Zy{N Y@AK=J)M5OY2j~C>Pgg&ebxsLQ0A12S2><{9 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..40f4dcf945da98dbc7c689fe5bc1e7b1c01a256a GIT binary patch literal 295 zcmV+?0oeYDP)X1^@s6b5wmq0002)Nkl!NT>uPl-bLYOGs#P$qr9D$@fIU?sR|J5L_-7 zTPtXo0ZJ(=XxK((keOy+Vg}jGRMcxr?ck6&%4V2&uPwEMqx@tNBk9S@&nD1<2o|e~ zAkm~Jzkvy~AcDoBB8?_5bhmFNCL}>kUg&P$%uHmRgQxkhFd>P~mH99+F%pOPGBGl@ zQLPeIMjk6+CF%VS*@W~yHAZ~lUWjj8a_NO?Bz84|uGxWXMAq!UHgaftF^$M=O^tD_ tT&9Wd%4Juhw|p~I-ceg{xm>P)bpo%3;B}TiZUF!Q002ovPDHLkV1frLcz6H+ literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..aa7240edc0e5902760d0201cc23cd1237139805f GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd!3HFYLuy@s)ICoZ$B>F!Z>L}6Jfa}rqMPWw zp`}E?dnex{KAnS;f}FfIuy}uPo6-E6WquV;VVI_Yx1 z_&oVF{D!ktH^*M-RZ{N|PTAJIEAR=6VaH_6Cn>1&piiqJk zpP|U%rljY-sbo;n?wW1eOl?r+O$`)UGDy{IZ{OQL( ah4WHo+>1VSb-FFkrwpF1elF{r5}E*WbaI>k literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-clockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..02a4ff521eb66ce6bdda9e0563549b11dde8e92c GIT binary patch literal 297 zcmV+^0oMMBP)X1^@s6b5wmq0002+NkluP^mcR8q`#MR_UAgur0~_gYQIG6~x9aR<5UbA42APpuOpw`<%Oi#(fS54W=rbE+bEwMZRTbOh zAj8;TJlG(4wyfkSZ&z&ff;k*u+$wXi-e3jH#e9QhNddHA`qu`M0%)=6&w>d>qP+mS vE5n4GXn4v*k96zR6FJ#>_0%;rHT|p)Wyauhqt!d)00000NkvXXu0mjfKrwy` literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-counterclockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-y-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..a14a6b47f494969489b50e2ad6e50f8a81894e2d GIT binary patch literal 292 zcmV+<0o(qGP)X1^@s6b5wmq0002%NklHrCg10+xfNI*&@tb|HHLU-5xOd=e}Pk_qqvp9D+ll&k?V(Q&f| zNPg^gB@BUfFPPNyX(;+0BtNF}O4Huw;OZ1AB5 znc=q>WQJvX>}>kLUzv&bM@N8rY9+S+#b>E^I@bKQR9?Gw3!A?1<14R{Zh2s;svsMf qsxC<5F!Z_gj(JfOhimgru< z;$Ea;UOc65(y}W~0@Xe`Pi=qjKU0eLa&h@`Kjrjtse}U!jLd925(XefJzq@xfvb{{ z;R)5>HD2?@&OVTPr(4(z$lCniwe7p3!m&J2dp5Gg%5AyRnvlN5B|$u+^GH-l{~^B@ fa=ofbw=Qv>E?Zp{J*CkI=oSV~S3j3^P6F!Z?7EWJfOhiaIxnB zN8S?Y)Gd9FG*({Xh&)j7;=jU1_1^*_ib}scOV=Gwk4g)BUUluvvA)uM=Vx`uely*4 zL3%acHJ*|KtC~%jWj8)b;CxXe_4@v^;>D*uOZxu{eS7mdKI;Vst05rN!sQ>@~ literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..9c96eb26727a6f59a4704d456f3dfac1bf6b7d0f GIT binary patch literal 320 zcmV-G0l)rhBV|NSOI|zoRZR!1)ChPbfs|9 zQj&C$BbKhzB#FbRwU}-#_AH--4yV>)y0*ygb_vu)=W{2P9h6VriDgyi4o0$rg>1*NtM*WqRiE4Tt+woY-&)+7o(?JLcGc$w zqjrN;yNSQI+QRixK^DTUtP)LhwmO;)7B?a84kfbU*b+^fs$$zcrz*s3n#t9TOk#=wAmsEDuPN!+(g z829KP&I*q2XNzI>oG|XM_#n;-j_+s7VYb!QIPjviQ>(THsQ99_lQneQc&=7$bt~xj z>bcU|WCa~|YKtcRZRqf>CSH&@YdM)MlK$XFnJtsv>jJd*&=@#qdk+lgq)!-QD=V$H zvWIY|MnY?2dXEg?NJ=>}Q^s;~B&3Yxe6-fOuwY;DqYW#5#Sa6vw13co9$-uT>CuF}#Zi1}Bt5|1;wV0~l1_ka3IOhl zuulX|4HnMV|&8jqHIrL=xI&h z(0f{2o{=)jnwD}LhLMBTE`_$D^_N>y*;+0U^S-di!4-)jjgx&ysDMN37 zz8KIeptELQw}b(mS$%yB-~sSXvBWd>>(=K^6Wrl&k^o<4UNi=9huc*Ge4TyKFqupy b(+qt9dteG%Zb~8O00000NkvXXu0mjfAt8-% literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-y-counterclockwise.png b/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-y-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..b8380e2c55121303c711dddac0638c3f230563a4 GIT binary patch literal 346 zcmV-g0j2(lP)Z426*}2}r;JNH_=JU^o~KkT5Aos01V+Vb|s!$wKbut<5EU$qPUD(R_Jbw|1S& z<#M_HPYb)SPxir1?4fnhQp!?3I@t$1u?J0XDK@fqz>8-E@PR$DcfgBhi{!@&yw@rU z_#3>p0AB(9(k#lbE1+K%(7jfRKcIWd7Qdk-wm2m z4FX)O&hduDqvfJO0FU=M=I$@2PivXMfOImkx!b*8*z&@Z0t|!ud sh$KzeFG-ucx=e~%!Ma>7m+O~$1Kv0aRhw?^VgLXD07*qoM6N<$f}hHfW&i*H literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-down.png b/apps/common/main/resources/img/toolbar/1.75x/btn-rotate-down.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d4e2348d3e61b36a7de8e31a4d59b24607847e GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^Za}Qe!3HEX#cOhb)C5l#$B>F!Z!aC>JfI-J8tA<- z`0as7I!A-dv;zeUkMC$Zb723P=^r|ZU4Y=fU*AswUWtSTMm7}Ur;*QvqwF)P{G}C} z^wuT3ik)6|s3KOfAjLuRZLN6E^{IWA6Q#WN{=Qp(wnJG=LtAF2vGdHrBV4JC%GWfM m{kFNxEcnE!0kq&tmG}^ zmTF=7Sb_OiK33{Ec@&_OMk*0Y;DQ!JN+_$W^+_mOl1jGJoI(oOQgaGPWXqoK9))b# zmv@iK%Qz{F=Sdm0Dqw~;E59|EVQ%GLB_5eTAeC4io2~+s`=+Y`rm2j7F1-QMSp8gb exm+%nOG`J*z&VC&B;~090000m~UdYQ#+i}h? z48t&tKckim3_p@{t|bGDlocz3lvP)gVp5(V#X(9&HpwEHB|%aZ7Nb%=Y?4JXOM;}j zvtm5fRx;tcit0*NjKpJYB@@1@sE(zbR8qozcV|06Qo?@6a@MrikEpEM&Kd~P{iu~y zN>13>_YkvQef~gB*xC0Gv)*z3d}Ayj=cK@qQOHb+FJ`4PbxhG7`SBX|Rnv@$ChBJV{2 O0000iB@nLD3M^I6`U3dwAbh? z;IvTqzSroi;M^K0fiQYL$B%E{26H>0@EtIEKF9W(h3+-Z3V(tM;$B1IF3`#>QUJ3e zi&Vf&EGGpp6Us@+&+G)G00#|tQUQY|mqfsz=_VC09kXT>0MjvRMin?0jt2@^bHR9^ z)N62=s|Xy-O;;5#hbx{%hDsQ|Sq09>exm?qWWSMulNHK}aI#`qrC_|TY04@o>}y(& zQ$zqAs|guE1HtSZI%g}-!|X}yJs3J?1eS>Z!^?=zfL!0d3d?}9(@2H)Z20A`0<|JDcI;5(eWAr*Lm-|#_5 z*=c$TyufexAS8)t$^>JRRGn8W6O5^Wx{0+^eXPVYOW4qd7Z?<%M0$~&eGU8)W5 zs!h?=#j+7X8UnapeHEWD2qB#T%x9OYc!bkEp!@=-dqVjMr+fFO0Zv!xPnq>Vp;Ttp k1DR483WY+UQ0UM40`&qplr6}l!~g&Q07*qoM6N<$f~L8qGXMYp literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-down.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-down.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8884a3ca9d139bcfdbe37d94f222055d56f554 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<8eD^1#(7Oyw910B#a!gO;Crmc@ z$27lK?XVW(6pQqR!&-bjvXKgr)9=fAdjhF@AD4EWzq8hO+oQjwufH6%zwvP=!-u>1 V{cEn(eFECf;OXk;vd$@?2>?nkLv8>7 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-up.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-up.png new file mode 100644 index 0000000000000000000000000000000000000000..8312c432843eb107b91c0a948a24dd6a24926997 GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<iNz!=XLCTp&spm zTPJS`@rvA7_{+;6Aff%0_QeCwR`>tTP56BE_uR&`x>wo;!fZwp8hKJ49A`eMf0Hrh XZhkla$2Iam>lr*<{an^LB{Ts5*lj~C literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..ada7e95ff37998733636aab07c9b650f95bac232 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<YK zYa!o;hUPFXp@JYzj})KC6?z@9y#0d^_>Q%gQq+WYmD z@GJrnGbhc{c^R$xTG(Ymh|iRy+8_bPppDwgD!DBV@G;GZl4?1^#J8cDVc9e`bJ3ak zxlvEeK-8=!VH5V}tT8^ZR>3|uCw5BwbJyHV6Yp=TmtN0rk!R!u^b&)otDnm{r-UW| Dad&44 literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..000dfdc0dd0895e1f097695ec18819022fdd3d3f GIT binary patch literal 254 zcmVvMEzQ(Bx_kWm6{91dZ7xxkdCoL1%VJj)+#t z{3wl`Edj}VFO8oqt&;TR%s%_tAW3g${@GV#!^tN(f=Wa_$q^|zC@1h48k7_D4AtzB zcE3pO(RM#m+l>Uw&8MzAWUqtU~0q<)`Jv~2`3!lcX4=9komH+?%07*qoM6N<$ Eg8Pd(M7ypz|+tyXnuHoS&R-3m#e#_MnU<<4X3I{MtE2CFjL`%CvHVOtSg7H*Jbzi*O8kwkYR> zCrjRmlPp=WxX-eX=k9s)inRQR>w3*P|0mQv`s@KgHe{ya|-o0td%x=%+ w^bW4w9a%5gE|$G}!nWNJw^e(jzHY8!aIap^yDlQ~G0-mzp00i_>zopr0H%&#%m4rY literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-y-counterclockwise.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-y-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..93e1ad70bb313e5c57e0c46294e3a7e492a3737a GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<O(>kvcCpP9QfrzXVpC(Nf*tF-#k`|eV-5a=0 z2=3!rBlIa?$#2%m70#D0tz}yCGVEQVcd7S|a{la9(T7A!lXZ$8TUxz77V+%Z=4^TC vkh+6a+%|$64y~$_G{3{Xq;=go`B!XAkJj^d=WKZh^b3QhtDnm{r-UW|rUhl< literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-down.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-down.png new file mode 100644 index 0000000000000000000000000000000000000000..fe5bd0a012b77d668b88a96d3d677c3ee51a7ec9 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!3HEV6KWZO)J;zp$B>F!Z?E0vJZ!+@aIxo+ z;GV$Eo|_!qJj_0E$Q@K(VK(*Pj{fsry5E~T6#faY&q|Bz=;(M+f67Wvc;X#42L?tK z0i48v_hPT-$TR5MCbI$=?-^eIy?QQ!Y1uaSxsO>NtUEtRF=3MXah{0vyY0NEH8>u0 zIcSw|{B+eZE(48O8WGoCR=l-~_}_Dz$@Snd&1n_FNfV!UvG4g9Yr*WMfBNO_f^%o< z_Ld&lZTW{ij@_pG_g6F7_45s*XSV{~SGUJHCAxi%(wuMmfu3aWboFyt=akR{0E1j< A+5i9m literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-up.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-up.png new file mode 100644 index 0000000000000000000000000000000000000000..fbe974a9cea79fc8fe1cbdd5d7dfb914663833ef GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!3HEV6KWZO)J;zp$B>F!Z?7KYJ!Bxj8aVxt z&?Ui_DlZjORb+RvOn)FWP2z8Zpk2XduCygnuRTfH+sxV6(a}-2JoK@VarEnoz4v3@ zuh?mMWcJ&syMO!g-ZP!7yyv7{aq<2Nzn2VRwbH%f=QU*y{EGh4Fr9T<#`#;m)iOO$ z*6)BLS01#oZP@lQT8d+ap3PkOhFj*f-pY)xtv8uJ7u!(QQ^WoB+uO50Iahps_)_-` xW7Ti|_6$OTf)~y2GDcdp&)OS(rxEB$22WQ%mvv4FO#qL8Y;phq literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..8e4973f3a2d8621a436b8b4df33c2869d851825b GIT binary patch literal 426 zcmV;b0agBqP)+;l@*pKH(o`NLQX(Zj=_FY)sjRz- z^Qk6L_ zvQ%G28>FvJNb}{IykX^Cosj0sHF@i{MZJ~{$iwi_wJoB&qib8Z{rMk329)Q21aSKc zI-b~=g7_RY+L(fRhqZAffmWZ9SbhJj`hq+AT2O&@_CfBib7Kplyw1iJ)apBdx907*qoM6N<$f_sy@xBvhE literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..35450b4c41fb336fe672540de7c0741a75926795 GIT binary patch literal 433 zcmV;i0Z#sjP)YFDmACx{%A-8Wv+`_SlBZ;r zOp*v7&+?KyC9`CbL^Oe|Z0jC9EA$tEEw*)!Gb*%oguP^tTvgg$ayOB!BP{WfL2^}T zd&%8J9=QiED$Z8q4dot`|1K)dR^$y$VqIrNW~64K>#WFpmc;SR+N8~oc6e}^KZEhzqqe>jiaYlTH9?Wru{ScAN5bgmbCNqS4 zREZ1fQC5iy`cV#Myg{tOV8$ERDy%c&1X_i4Mx0OuMspV;3XJtGbimZHCW1<=V@*UA zm=C_qoFyRNQj4Cjgj}nLiYd2m|1$yvC;{QS;sq>%%mH3S#gb+dq bA*8_<9+Or2P0_H-00000NkvXXu0mjfJmRvg literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-y-clockwise.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-y-clockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..42917ea7938070ffd8af295d7d2ccc7208c1388f GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!3HEV6KWY57#O=eT^vIyZoR!3yY{dFPuoK$ zjb_P15^DsGJ?L>flpw&gP=ITp09zuEOrM#fdHhsu+{+)67kTcSC3o}ZYZF(ci5@CK zoquL`@THvlJjLonMZPT4(dyR%TK85mx88UV8PFle-+JSqv*NajeN64jRyOgChXt21 zr#2W#ZERNOT_7M(%>LrS&YOzM7#nUf*VggRoh_Rr720|-bb4d#EG=K=Xp5~^uQq^~ z!Wy%g{yCg)oXw>4e|~5Rt4_dyB@L}yJ4{|H2^MTDomew>b8kwc(k-`50gUsxb~u5E zAjb4^xh0I}-d0ZNiV!Ji4@(R@FgK=kn^;&eu6r>>YE za;mxa>E^=@YuSzK+Sf0eYs|9&LhqgXwnyVa*}r*$E3f{T@y~A0x+T)5+21~tiwl3$ z>nd{2{{QuzyWidT?BEh;@&8Z!^LM4k*X8;*y{YxzXvnBgeLr}gV(3%f_ZMd8Ssc%B rXs^6%{biZ-IY;Im7f28meBxdi75ZZfbP0l+XkK^7O|e literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-y-counterclockwise.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-y-counterclockwise.png new file mode 100644 index 0000000000000000000000000000000000000000..8fb1cd5f8a1c94358075a38b37547df9f4aec415 GIT binary patch literal 475 zcmeAS@N?(olHy`uVBq!ia0vp^0YI$5!3HEV6KWY57#J6Mx;TbZ+{X z0j7mKVru+b@n;+MFHAT2u zofZaYh)BIou)oRw?O5DR(PstvwooSTgA;RW)5RGYluN(OjTKNx`*z5Vd&|27Kh~2I zjH(movqqI0BsxURWtp?~1b0C8d=Tx;6jG=ledX`rsm~p@v1m<7EIx7IWP*Zc+gU|s z^~GU}@AX^9%&7OKyec1LrDRpnF8|y72mB`t0PeU zB}`B4o#{P`W`US O7(8A5T-G@yGywoV_QZ_< literal 0 HcmV?d00001 From 8e0c9709e13c4b928d752564bd23455e2694bd21 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 12 Sep 2022 17:39:28 +0300 Subject: [PATCH 4/8] [SSE] Update icons --- .../img/toolbar/1.25x/btn-rotate-x-clockwise.png | Bin 295 -> 0 bytes .../1.25x/btn-rotate-x-counterclockwise.png | Bin 279 -> 0 bytes .../img/toolbar/1.5x/btn-rotate-x-clockwise.png | Bin 320 -> 0 bytes .../1.5x/btn-rotate-x-counterclockwise.png | Bin 338 -> 0 bytes .../img/toolbar/1.75x/btn-rotate-x-clockwise.png | Bin 384 -> 0 bytes .../1.75x/btn-rotate-x-counterclockwise.png | Bin 368 -> 0 bytes .../img/toolbar/1x/btn-rotate-x-clockwise.png | Bin 256 -> 0 bytes .../toolbar/1x/btn-rotate-x-counterclockwise.png | Bin 254 -> 0 bytes .../img/toolbar/2x/btn-rotate-x-clockwise.png | Bin 426 -> 0 bytes .../toolbar/2x/btn-rotate-x-counterclockwise.png | Bin 433 -> 0 bytes .../main/app/view/ChartSettings.js | 8 ++++---- 11 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-counterclockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-x-clockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1.75x/btn-rotate-x-counterclockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-x-clockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-x-clockwise.png delete mode 100644 apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-clockwise.png deleted file mode 100644 index 40f4dcf945da98dbc7c689fe5bc1e7b1c01a256a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 295 zcmV+?0oeYDP)X1^@s6b5wmq0002)Nkl!NT>uPl-bLYOGs#P$qr9D$@fIU?sR|J5L_-7 zTPtXo0ZJ(=XxK((keOy+Vg}jGRMcxr?ck6&%4V2&uPwEMqx@tNBk9S@&nD1<2o|e~ zAkm~Jzkvy~AcDoBB8?_5bhmFNCL}>kUg&P$%uHmRgQxkhFd>P~mH99+F%pOPGBGl@ zQLPeIMjk6+CF%VS*@W~yHAZ~lUWjj8a_NO?Bz84|uGxWXMAq!UHgaftF^$M=O^tD_ tT&9Wd%4Juhw|p~I-ceg{xm>P)bpo%3;B}TiZUF!Q002ovPDHLkV1frLcz6H+ diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/1.25x/btn-rotate-x-counterclockwise.png deleted file mode 100644 index aa7240edc0e5902760d0201cc23cd1237139805f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjd!3HFYLuy@s)ICoZ$B>F!Z>L}6Jfa}rqMPWw zp`}E?dnex{KAnS;f}FfIuy}uPo6-E6WquV;VVI_Yx1 z_&oVF{D!ktH^*M-RZ{N|PTAJIEAR=6VaH_6Cn>1&piiqJk zpP|U%rljY-sbo;n?wW1eOl?r+O$`)UGDy{IZ{OQL( ah4WHo+>1VSb-FFkrwpF1elF{r5}E*WbaI>k diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png b/apps/common/main/resources/img/toolbar/1.5x/btn-rotate-x-clockwise.png deleted file mode 100644 index 9c96eb26727a6f59a4704d456f3dfac1bf6b7d0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 320 zcmV-G0l)rhBV|NSOI|zoRZR!1)ChPbfs|9 zQj&C$BbKhzB#FbRwU}-#_AH--4yV>)y0*ygb_vu)=W{2P9h6VriDgyi4o0$rg>1*NtM*WqRiE4Tt+woY-&)+7o(?JLcGc$w zqjrN;yNSQI+QRixK^DTUtP)LhwmO;)7B?a84kfbU*b+^fs$$zcrz*s3n#t9TOk#=wAmsEDuPN!+(g z829KP&I*q2XNzI>oG|XM_#n;-j_+s7VYb!QIPjviQ>(THsQ99_lQneQc&=7$bt~xj z>bcU|WCa~|YKtcRZRqf>CSH&@YdM)MlK$XFnJtsv>jJd*&=@#qdk+lgq)!-QD=V$H zvWIY|MnY?2dXEg?NJ=>}Q^s;~B&3Yx^ zmTF=7Sb_OiK33{Ec@&_OMk*0Y;DQ!JN+_$W^+_mOl1jGJoI(oOQgaGPWXqoK9))b# zmv@iK%Qz{F=Sdm0Dqw~;E59|EVQ%GLB_5eTAeC4io2~+s`=+Y`rm2j7F1-QMSp8gb exm+%nOG`J*z&VC&B;~090000m~UdYQ#+i}h? z48t&tKckim3_p@{t|bGDlocz3lvP)gVp5(V#X(9&HpwEHB|%aZ7Nb%=Y?4JXOM;}j zvtm5fRx;tcit0*NjKpJYB@@1@sE(zbR8qozcV|06Qo?@6a@MrikEpEM&Kd~P{iu~y zN>13>_YkvQef~gB*xC0Gv)*z3d}Ayj=cK@qQOHb+FJ`4PbxhG7`SBX|Rnv@$ChBJV{2 O0000YK zYa!o;hUPFXp@JYzj})KC6?z@9y#0d^_>Q%gQq+WYmD z@GJrnGbhc{c^R$xTG(Ymh|iRy+8_bPppDwgD!DBV@G;GZl4?1^#J8cDVc9e`bJ3ak zxlvEeK-8=!VH5V}tT8^ZR>3|uCw5BwbJyHV6Yp=TmtN0rk!R!u^b&)otDnm{r-UW| Dad&44 diff --git a/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/1x/btn-rotate-x-counterclockwise.png deleted file mode 100644 index 000dfdc0dd0895e1f097695ec18819022fdd3d3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmVvMEzQ(Bx_kWm6{91dZ7xxkdCoL1%VJj)+#t z{3wl`Edj}VFO8oqt&;TR%s%_tAW3g${@GV#!^tN(f=Wa_$q^|zC@1h48k7_D4AtzB zcE3pO(RM#m+l>Uw&8MzAWUqtU~0q<)`Jv~2`3!lcX4=9komH+?%07*qoM6N<$ Eg8P+;l@*pKH(o`NLQX(Zj=_FY)sjRz- z^Qk6L_ zvQ%G28>FvJNb}{IykX^Cosj0sHF@i{MZJ~{$iwi_wJoB&qib8Z{rMk329)Q21aSKc zI-b~=g7_RY+L(fRhqZAffmWZ9SbhJj`hq+AT2O&@_CfBib7Kplyw1iJ)apBdx907*qoM6N<$f_sy@xBvhE diff --git a/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png b/apps/common/main/resources/img/toolbar/2x/btn-rotate-x-counterclockwise.png deleted file mode 100644 index 35450b4c41fb336fe672540de7c0741a75926795..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 433 zcmV;i0Z#sjP)YFDmACx{%A-8Wv+`_SlBZ;r zOp*v7&+?KyC9`CbL^Oe|Z0jC9EA$tEEw*)!Gb*%oguP^tTvgg$ayOB!BP{WfL2^}T zd&%8J9=QiED$Z8q4dot`|1K)dR^$y$VqIrNW~64K>#WFpmc;SR+N8~oc6e}^KZEhzqqe>jiaYlTH9?Wru{ScAN5bgmbCNqS4 zREZ1fQC5iy`cV#Myg{tOV8$ERDy%c&1X_i4Mx0OuMspV;3XJtGbimZHCW1<=V@*UA zm=C_qoFyRNQj4Cjgj}nLiYd2m|1$yvC;{QS;sq>%%mH3S#gb+dq bA*8_<9+Or2P0_H-00000NkvXXu0mjfJmRvg diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 2dc82f09b..2bd693270 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -893,7 +893,7 @@ define([ this.btnUp = new Common.UI.Button({ parentEl: $('#chart-btn-y-up', me.$el), cls: 'btn-toolbar', - iconCls: 'toolbar__icon btn-rotate-270', + iconCls: 'toolbar__icon btn-rotate-y-clockwise', hint: this.textUp, dataHint: '1', dataHintDirection: 'top' @@ -906,7 +906,7 @@ define([ this.btnDown= new Common.UI.Button({ parentEl: $('#chart-btn-y-down', me.$el), cls: 'btn-toolbar', - iconCls: 'toolbar__icon btn-rotate-90', + iconCls: 'toolbar__icon btn-rotate-y-counterclockwise', hint: this.textDown, dataHint: '1', dataHintDirection: 'top' @@ -935,7 +935,7 @@ define([ this.btnNarrow = new Common.UI.Button({ parentEl: $('#chart-btn-narrow', me.$el), cls: 'btn-toolbar', - iconCls: 'toolbar__icon btn-rotate-270', + iconCls: 'toolbar__icon btn-rotate-up', hint: this.textNarrow, dataHint: '1', dataHintDirection: 'top' @@ -948,7 +948,7 @@ define([ this.btnWiden= new Common.UI.Button({ parentEl: $('#chart-btn-widen', me.$el), cls: 'btn-toolbar', - iconCls: 'toolbar__icon btn-rotate-90', + iconCls: 'toolbar__icon btn-rotate-down', hint: this.textWiden, dataHint: '1', dataHintDirection: 'top' From 5d14293056f4262baa263c6d6e9eca456e799f8e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 12 Sep 2022 19:57:16 +0300 Subject: [PATCH 5/8] [DE] Add 3d rotation settings for charts --- .../main/app/template/ChartSettings.template | 65 ++++ .../main/app/view/ChartSettings.js | 368 +++++++++++++++++- 2 files changed, 432 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/template/ChartSettings.template b/apps/documenteditor/main/app/template/ChartSettings.template index 751395f99..6cd8a6740 100644 --- a/apps/documenteditor/main/app/template/ChartSettings.template +++ b/apps/documenteditor/main/app/template/ChartSettings.template @@ -57,6 +57,71 @@ +
diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index ea4c29e05..09cb2c040 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -114,6 +114,7 @@ define([ this.SparkTypesContainer = $('#spark-panel-types'); this.SparkPointsContainer = $('#spark-panel-points'); this.NotCombinedSettings = $('.not-combined'); + this.Chart3DContainer = $('#chart-panel-3d-rotate'); }, render: function () { @@ -141,11 +142,15 @@ define([ return; } - this.ShowHideElem(!!(props && props.asc_getChartProperties && props.asc_getChartProperties())); + var isChart = !!(props && props.asc_getChartProperties && props.asc_getChartProperties()), + chartSettings = isChart ? this.api.asc_getChartObject(true) : null, // don't lock chart object + props3d = chartSettings ? chartSettings.getView3d() : null; + + this.ShowHideElem(isChart, !!props3d); this.disableControls(this._locked); if (this.api && props){ - if (props.asc_getChartProperties && props.asc_getChartProperties()) { // chart + if (isChart) { // chart this._originalProps = new Asc.asc_CImgProperty(props); this.isChart = true; @@ -210,9 +215,53 @@ define([ this._state.keepRatio=value; } - var chartSettings = this.api.asc_getChartObject(true), // don't lock chart object - series = chartSettings ? chartSettings.getSeries() : null; + var series = chartSettings ? chartSettings.getSeries() : null; this.btnSwitch.setDisabled(!series || series.length<1 || !chartSettings || !chartSettings.getRange()); + + if (props3d) { + value = props3d.asc_getRotX(); + if ((this._state.X===undefined || value===undefined)&&(this._state.X!==value) || + Math.abs(this._state.X-value)>0.001) { + this.spnX.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.X = value; + } + + value = props3d.asc_getRotY(); + if ( (this._state.Y===undefined || value===undefined)&&(this._state.Y!==value) || + Math.abs(this._state.Y-value)>0.001) { + this.spnY.setValue((value!==null && value !== undefined) ? value : '', true); + 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; + } + + value = props3d.asc_getDepth(); + if ( Math.abs(this._state.Depth-value)>0.001 || + (this._state.Depth===undefined || value===undefined)&&(this._state.Depth!==value)) { + this.spn3DDepth.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.Depth = value; + } + + value = props3d.asc_getHeight(); + if ( Math.abs(this._state.Height3d-value)>0.001 || + (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; + } + } } else { //sparkline this._originalProps = props; this.isChart = false; @@ -778,6 +827,208 @@ define([ this.btnSwitch.on('click', _.bind(this.onSwitch, this)); this.lockedControls.push(this.btnSwitch); + // 3d rotation + this.spnX = new Common.UI.MetricSpinner({ + el: $('#chart-spin-x'), + step: 10, + width: 45, + defaultUnit : "°", + value: '20 °', + maxValue: 359.9, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnX); + this.spnX.on('change', _.bind(this.onXRotation, this)); + this.spnX.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.btnLeft = new Common.UI.Button({ + parentEl: $('#chart-btn-x-left', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-270', + hint: this.textLeft, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnLeft); + this.btnLeft.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() - 10); + }, this)); + + this.btnRight= new Common.UI.Button({ + parentEl: $('#chart-btn-x-right', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-90', + hint: this.textRight, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnRight); + this.btnRight.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() + 10); + }, this)); + + this.spnY = new Common.UI.MetricSpinner({ + el: $('#chart-spin-y'), + step: 10, + width: 45, + defaultUnit : "°", + value: '15 °', + maxValue: 90, + minValue: -90, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnY); + this.spnY.on('change', _.bind(this.onYRotation, this)); + this.spnY.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.btnUp = new Common.UI.Button({ + parentEl: $('#chart-btn-y-up', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-270', + hint: this.textUp, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnUp); + this.btnUp.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() + 10); + }, this)); + + this.btnDown= new Common.UI.Button({ + parentEl: $('#chart-btn-y-down', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-90', + hint: this.textDown, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnDown); + this.btnDown.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() + 10); + }, this)); + + this.spnPerspective = new Common.UI.MetricSpinner({ + el: $('#chart-spin-persp'), + step: 5, + width: 45, + defaultUnit : "°", + value: '0 °', + maxValue: 100, + minValue: 0.1, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnPerspective); + this.spnPerspective.on('change', _.bind(this.onPerspective, this)); + this.spnPerspective.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.btnNarrow = new Common.UI.Button({ + parentEl: $('#chart-btn-narrow', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-270', + hint: this.textNarrow, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnNarrow); + this.btnNarrow.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + }, this)); + + this.btnWiden= new Common.UI.Button({ + parentEl: $('#chart-btn-widen', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-90', + hint: this.textWiden, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnWiden); + this.btnWiden.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + }, this)); + + this.chRightAngle = new Common.UI.CheckBox({ + el: $('#chart-checkbox-right-angle'), + labelText: this.textRightAngle + }); + this.lockedControls.push(this.chRightAngle); + this.chRightAngle.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRightAngleAxes(field.getValue()=='checked'); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, this)); + + this.chAutoscale = new Common.UI.CheckBox({ + el: $('#chart-checkbox-autoscale'), + labelText: this.textAutoscale + }); + this.lockedControls.push(this.chAutoscale); + this.chAutoscale.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getValue()=='checked' ? null : this.spn3DHeight.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, this)); + + this.spn3DDepth = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-depth'), + step: 10, + width: 78, + defaultUnit : "%", + value: '0 %', + maxValue: 2000, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DDepth); + this.spn3DDepth.on('change', _.bind(this.on3DDepth, this)); + this.spn3DDepth.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.spn3DHeight = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-height'), + step: 10, + width: 78, + defaultUnit : "%", + value: '50 %', + maxValue: 500, + minValue: 5, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DHeight); + this.spn3DHeight.on('change', _.bind(this.on3DHeight, this)); + this.spn3DHeight.on('inputleave', function(){ Common.NotificationCenter.trigger('edit:complete', me);}); + + this.linkDefRotation = $('#chart-def-rotate-link'); + $(this.el).on('click', '#chart-def-rotate-link', _.bind(this.onDefRotation, this)); + this.linkAdvanced = $('#chart-advanced-link'); $(this.el).on('click', '#chart-advanced-link', _.bind(this.openAdvancedSettings, this)); }, @@ -789,11 +1040,12 @@ define([ this.UpdateThemeColors(); }, - ShowHideElem: function(isChart) { + ShowHideElem: function(isChart, is3D) { this.ChartSizeContainer.toggleClass('settings-hidden', !isChart); this.ChartTypesContainer.toggleClass('settings-hidden', !isChart); this.SparkTypesContainer.toggleClass('settings-hidden', isChart); this.SparkPointsContainer.toggleClass('settings-hidden', isChart); + this.Chart3DContainer.toggleClass('settings-hidden', !isChart || !is3D); }, ShowCombinedProps: function(type) { @@ -1300,6 +1552,97 @@ define([ } }, + onXRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onYRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotY(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onPerspective: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setPerspective(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DDepth: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setDepth(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DHeight: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onDefRotation: function() { + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(20); + oView3D.asc_setRotY(15); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + setLocked: function (locked) { this._locked = locked; }, @@ -1340,7 +1683,22 @@ define([ textBorderSizeErr: 'The entered value is incorrect.
Please enter a value between 0 pt and 1584 pt.', textChangeType: 'Change type', textSwitch: 'Switch Row/Column', - errorMaxRows: 'The maximum number of data series per chart is 255.' + errorMaxRows: 'The maximum number of data series per chart is 255.', + text3dRotation: '3D Rotation', + textX: 'X rotation', + textY: 'Y rotation', + textPerspective: 'Perspective', + text3dDepth: 'Depth', + text3dHeight: 'Height', + textLeft: 'Left', + textRight: 'Right', + textUp: 'Up', + textDown: 'Down', + textNarrow: 'Narrow field of view', + textWiden: 'Widen field of view', + textRightAngle: 'Right Angle Axes', + textAutoscale: 'Autoscale', + textDefault: 'Default Rotation' }, SSE.Views.ChartSettings || {})); }); \ No newline at end of file From b8419707bff3a7520185a3d7149ebc3606ff3f16 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 7 Sep 2022 23:58:22 +0300 Subject: [PATCH 2/8] [SSE] Fix 3d rotation settings --- apps/common/main/resources/less/common.less | 6 +++ .../main/app/template/ChartSettings.template | 10 ++--- .../main/app/view/ChartSettings.js | 42 ++++++++++--------- apps/spreadsheeteditor/main/locale/en.json | 15 +++++++ 4 files changed, 49 insertions(+), 24 deletions(-) diff --git a/apps/common/main/resources/less/common.less b/apps/common/main/resources/less/common.less index 6e37abbb4..fd1e90200 100644 --- a/apps/common/main/resources/less/common.less +++ b/apps/common/main/resources/less/common.less @@ -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 { diff --git a/apps/spreadsheeteditor/main/app/template/ChartSettings.template b/apps/spreadsheeteditor/main/app/template/ChartSettings.template index e728e6578..d33d89931 100644 --- a/apps/spreadsheeteditor/main/app/template/ChartSettings.template +++ b/apps/spreadsheeteditor/main/app/template/ChartSettings.template @@ -59,7 +59,7 @@
- +
@@ -67,7 +67,7 @@
- +
@@ -75,7 +75,7 @@
- +
@@ -93,13 +93,13 @@
- +
- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
diff --git a/apps/documenteditor/main/app/view/ChartSettings.js b/apps/documenteditor/main/app/view/ChartSettings.js index 09b25f1fe..29f94772e 100644 --- a/apps/documenteditor/main/app/view/ChartSettings.js +++ b/apps/documenteditor/main/app/view/ChartSettings.js @@ -95,6 +95,7 @@ define([ this.labelWidth = el.find('#chart-label-width'); this.labelHeight = el.find('#chart-label-height'); this.NotCombinedSettings = $('.not-combined'); + this.Chart3DContainer = $('#chart-panel-3d-rotate'); }, setApi: function(api) { @@ -195,6 +196,57 @@ define([ this.labelHeight[0].innerHTML = this.textHeight + ': ' + Common.Utils.Metric.fnRecalcFromMM(value).toFixed(1) + ' ' + Common.Utils.Metric.getCurrentMetricName(); this._state.Height = value; } + + var props3d = this.chartProps ? this.chartProps.getView3d() : null; + this.ShowHideElem(!!props3d); + if (props3d) { + value = props3d.asc_getRotX(); + if ((this._state.X===undefined || value===undefined)&&(this._state.X!==value) || + Math.abs(this._state.X-value)>0.001) { + this.spnX.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.X = value; + } + + value = props3d.asc_getRotY(); + if ( (this._state.Y===undefined || value===undefined)&&(this._state.Y!==value) || + Math.abs(this._state.Y-value)>0.001) { + this.spnY.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.Y = value; + } + + value = props3d.asc_getRightAngleAxes(); + if ( this._state.RightAngle!==value ) { + this.chRightAngle.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true); + 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)) { + this.spn3DDepth.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.Depth = value; + } + + value = props3d.asc_getHeight(); + if ( Math.abs(this._state.Height3d-value)>0.001 || + (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._state.Height3d = value; + } + this.spn3DHeight.setDisabled(this._locked || value===null); + } } }, @@ -282,6 +334,210 @@ define([ this.lockedControls.push(this.btnEditData); this.btnEditData.on('click', _.bind(this.setEditData, this)); + // 3d rotation + this.spnX = new Common.UI.MetricSpinner({ + el: $('#chart-spin-x'), + step: 10, + width: 57, + defaultUnit : "°", + value: '20 °', + maxValue: 359.9, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnX); + this.spnX.on('change', _.bind(this.onXRotation, this)); + this.spnX.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnLeft = new Common.UI.Button({ + parentEl: $('#chart-btn-x-left', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-270', + hint: this.textLeft, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnLeft); + this.btnLeft.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() - 10); + }, this)); + + this.btnRight= new Common.UI.Button({ + parentEl: $('#chart-btn-x-right', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-90', + hint: this.textRight, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnRight); + this.btnRight.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() + 10); + }, this)); + + this.spnY = new Common.UI.MetricSpinner({ + el: $('#chart-spin-y'), + step: 10, + width: 57, + defaultUnit : "°", + value: '15 °', + maxValue: 90, + minValue: -90, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnY); + this.spnY.on('change', _.bind(this.onYRotation, this)); + this.spnY.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnUp = new Common.UI.Button({ + parentEl: $('#chart-btn-y-up', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-y-clockwise', + hint: this.textUp, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnUp); + this.btnUp.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() - 10); + }, this)); + + this.btnDown= new Common.UI.Button({ + parentEl: $('#chart-btn-y-down', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-y-counterclockwise', + hint: this.textDown, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnDown); + this.btnDown.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() + 10); + }, this)); + + this.spnPerspective = new Common.UI.MetricSpinner({ + el: $('#chart-spin-persp'), + step: 5, + width: 57, + defaultUnit : "°", + value: '0 °', + maxValue: 100, + minValue: 0.1, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnPerspective); + this.spnPerspective.on('change', _.bind(this.onPerspective, this)); + this.spnPerspective.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnNarrow = new Common.UI.Button({ + parentEl: $('#chart-btn-narrow', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-up', + hint: this.textNarrow, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnNarrow); + this.btnNarrow.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() - 5); + }, this)); + + this.btnWiden= new Common.UI.Button({ + parentEl: $('#chart-btn-widen', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-down', + hint: this.textWiden, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnWiden); + this.btnWiden.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + }, this)); + + this.chRightAngle = new Common.UI.CheckBox({ + el: $('#chart-checkbox-right-angle'), + labelText: this.textRightAngle + }); + this.lockedControls.push(this.chRightAngle); + this.chRightAngle.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setRightAngleAxes(field.getValue()=='checked'); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); + } + } + } + }, this)); + + this.chAutoscale = new Common.UI.CheckBox({ + el: $('#chart-checkbox-autoscale'), + labelText: this.textAutoscale + }); + this.lockedControls.push(this.chAutoscale); + this.chAutoscale.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getValue()=='checked' ? null : this.spn3DHeight.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); + } + } + } + }, this)); + + this.spn3DDepth = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-depth'), + step: 10, + width: 70, + defaultUnit : "%", + value: '0 %', + maxValue: 2000, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DDepth); + this.spn3DDepth.on('change', _.bind(this.on3DDepth, this)); + this.spn3DDepth.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.spn3DHeight = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-height'), + step: 10, + width: 70, + defaultUnit : "%", + value: '50 %', + maxValue: 500, + minValue: 5, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DHeight); + this.spn3DHeight.on('change', _.bind(this.on3DHeight, this)); + this.spn3DHeight.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.linkDefRotation = $('#chart-def-rotate-link'); + $(this.el).on('click', '#chart-def-rotate-link', _.bind(this.onDefRotation, this)); + this.linkAdvanced = $('#chart-advanced-link'); $(this.el).on('click', '#chart-advanced-link', _.bind(this.openAdvancedSettings, this)); }, @@ -522,6 +778,101 @@ define([ type==Asc.c_oAscChartTypeSettings.comboAreaBar || type==Asc.c_oAscChartTypeSettings.comboCustom); }, + ShowHideElem: function(is3D) { + this.Chart3DContainer.toggleClass('settings-hidden', !is3D); + }, + + onXRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onYRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotY(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onPerspective: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setPerspective(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DDepth: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setDepth(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DHeight: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onDefRotation: function() { + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(20); + oView3D.asc_setRotY(15); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + setLocked: function (locked) { this._locked = locked; }, @@ -552,7 +903,22 @@ define([ txtInFront: 'In front', textEditData: 'Edit Data', textChartType: 'Change Chart Type', - textStyle: 'Style' + textStyle: 'Style', + text3dRotation: '3D Rotation', + textX: 'X rotation', + textY: 'Y rotation', + textPerspective: 'Perspective', + text3dDepth: 'Depth (% of base)', + text3dHeight: 'Height (% of base)', + textLeft: 'Left', + textRight: 'Right', + textUp: 'Up', + textDown: 'Down', + textNarrow: 'Narrow field of view', + textWiden: 'Widen field of view', + textRightAngle: 'Right Angle Axes', + textAutoscale: 'Autoscale', + textDefault: 'Default Rotation' }, DE.Views.ChartSettings || {})); }); \ No newline at end of file From 066aca3d07fb7ce8a0eee85b64cc0012b64fbd9f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 12 Sep 2022 20:10:15 +0300 Subject: [PATCH 6/8] [PE] Add 3d settings for charts --- apps/documenteditor/main/locale/en.json | 15 + .../main/app/template/ChartSettings.template | 65 ++++ .../main/app/view/ChartSettings.js | 366 +++++++++++++++++- apps/presentationeditor/main/locale/en.json | 15 + 4 files changed, 460 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 93d4c3fa5..433028678 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1355,6 +1355,21 @@ "DE.Views.ChartSettings.txtTight": "Tight", "DE.Views.ChartSettings.txtTitle": "Chart", "DE.Views.ChartSettings.txtTopAndBottom": "Top and bottom", + "DE.Views.ChartSettings.text3dRotation": "3D Rotation", + "DE.Views.ChartSettings.textX": "X rotation", + "DE.Views.ChartSettings.textY": "Y rotation", + "DE.Views.ChartSettings.textPerspective": "Perspective", + "DE.Views.ChartSettings.text3dDepth": "Depth (% of base)", + "DE.Views.ChartSettings.text3dHeight": "Height (% of base)", + "DE.Views.ChartSettings.textLeft": "Left", + "DE.Views.ChartSettings.textRight": "Right", + "DE.Views.ChartSettings.textUp": "Up", + "DE.Views.ChartSettings.textDown": "Down", + "DE.Views.ChartSettings.textNarrow": "Narrow field of view", + "DE.Views.ChartSettings.textWiden": "Widen field of view", + "DE.Views.ChartSettings.textRightAngle": "Right Angle Axes", + "DE.Views.ChartSettings.textAutoscale": "Autoscale", + "DE.Views.ChartSettings.textDefault": "Default Rotation", "DE.Views.ControlSettingsDialog.strGeneral": "General", "DE.Views.ControlSettingsDialog.textAdd": "Add", "DE.Views.ControlSettingsDialog.textAppearance": "Appearance", diff --git a/apps/presentationeditor/main/app/template/ChartSettings.template b/apps/presentationeditor/main/app/template/ChartSettings.template index c950a36ee..336294b94 100644 --- a/apps/presentationeditor/main/app/template/ChartSettings.template +++ b/apps/presentationeditor/main/app/template/ChartSettings.template @@ -49,6 +49,71 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
diff --git a/apps/presentationeditor/main/app/view/ChartSettings.js b/apps/presentationeditor/main/app/view/ChartSettings.js index b6475f081..ce4ef4150 100644 --- a/apps/presentationeditor/main/app/view/ChartSettings.js +++ b/apps/presentationeditor/main/app/view/ChartSettings.js @@ -181,6 +181,57 @@ define([ this.btnRatio.toggle(value); this._state.keepRatio=value; } + + var props3d = this.chartProps ? this.chartProps.getView3d() : null; + this.ShowHideElem(!!props3d); + if (props3d) { + value = props3d.asc_getRotX(); + if ((this._state.X===undefined || value===undefined)&&(this._state.X!==value) || + Math.abs(this._state.X-value)>0.001) { + this.spnX.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.X = value; + } + + value = props3d.asc_getRotY(); + if ( (this._state.Y===undefined || value===undefined)&&(this._state.Y!==value) || + Math.abs(this._state.Y-value)>0.001) { + this.spnY.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.Y = value; + } + + value = props3d.asc_getRightAngleAxes(); + if ( this._state.RightAngle!==value ) { + this.chRightAngle.setValue((value !== null && value !== undefined) ? value : 'indeterminate', true); + 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)) { + this.spn3DDepth.setValue((value!==null && value !== undefined) ? value : '', true); + this._state.Depth = value; + } + + value = props3d.asc_getHeight(); + if ( Math.abs(this._state.Height3d-value)>0.001 || + (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._state.Height3d = value; + } + this.spn3DHeight.setDisabled(this._locked || value===null); + } } }, @@ -290,10 +341,213 @@ define([ this.fireEvent('editcomplete', this); }, this)); + // 3d rotation + this.spnX = new Common.UI.MetricSpinner({ + el: $('#chart-spin-x'), + step: 10, + width: 57, + defaultUnit : "°", + value: '20 °', + maxValue: 359.9, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnX); + this.spnX.on('change', _.bind(this.onXRotation, this)); + this.spnX.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnLeft = new Common.UI.Button({ + parentEl: $('#chart-btn-x-left', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-270', + hint: this.textLeft, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnLeft); + this.btnLeft.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() - 10); + }, this)); + + this.btnRight= new Common.UI.Button({ + parentEl: $('#chart-btn-x-right', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-90', + hint: this.textRight, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnRight); + this.btnRight.on('click', _.bind(function() { + this.spnX.setValue(this.spnX.getNumberValue() + 10); + }, this)); + + this.spnY = new Common.UI.MetricSpinner({ + el: $('#chart-spin-y'), + step: 10, + width: 57, + defaultUnit : "°", + value: '15 °', + maxValue: 90, + minValue: -90, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnY); + this.spnY.on('change', _.bind(this.onYRotation, this)); + this.spnY.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnUp = new Common.UI.Button({ + parentEl: $('#chart-btn-y-up', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-y-clockwise', + hint: this.textUp, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnUp); + this.btnUp.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() - 10); + }, this)); + + this.btnDown= new Common.UI.Button({ + parentEl: $('#chart-btn-y-down', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-y-counterclockwise', + hint: this.textDown, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnDown); + this.btnDown.on('click', _.bind(function() { + this.spnY.setValue(this.spnY.getNumberValue() + 10); + }, this)); + + this.spnPerspective = new Common.UI.MetricSpinner({ + el: $('#chart-spin-persp'), + step: 5, + width: 57, + defaultUnit : "°", + value: '0 °', + maxValue: 100, + minValue: 0.1, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spnPerspective); + this.spnPerspective.on('change', _.bind(this.onPerspective, this)); + this.spnPerspective.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.btnNarrow = new Common.UI.Button({ + parentEl: $('#chart-btn-narrow', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-up', + hint: this.textNarrow, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnNarrow); + this.btnNarrow.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() - 5); + }, this)); + + this.btnWiden= new Common.UI.Button({ + parentEl: $('#chart-btn-widen', me.$el), + cls: 'btn-toolbar', + iconCls: 'toolbar__icon btn-rotate-down', + hint: this.textWiden, + dataHint: '1', + dataHintDirection: 'top' + }); + this.lockedControls.push(this.btnWiden); + this.btnWiden.on('click', _.bind(function() { + this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + }, this)); + + this.chRightAngle = new Common.UI.CheckBox({ + el: $('#chart-checkbox-right-angle'), + labelText: this.textRightAngle + }); + this.lockedControls.push(this.chRightAngle); + this.chRightAngle.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setRightAngleAxes(field.getValue()=='checked'); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); + } + } + } + }, this)); + + this.chAutoscale = new Common.UI.CheckBox({ + el: $('#chart-checkbox-autoscale'), + labelText: this.textAutoscale + }); + this.lockedControls.push(this.chAutoscale); + this.chAutoscale.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this.api){ + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getValue()=='checked' ? null : this.spn3DHeight.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); + } + } + } + }, this)); + + this.spn3DDepth = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-depth'), + step: 10, + width: 70, + defaultUnit : "%", + value: '0 %', + maxValue: 2000, + minValue: 0, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DDepth); + this.spn3DDepth.on('change', _.bind(this.on3DDepth, this)); + this.spn3DDepth.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.spn3DHeight = new Common.UI.MetricSpinner({ + el: $('#chart-spin-3d-height'), + step: 10, + width: 70, + defaultUnit : "%", + value: '50 %', + maxValue: 500, + minValue: 5, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + this.lockedControls.push(this.spn3DHeight); + this.spn3DHeight.on('change', _.bind(this.on3DHeight, this)); + this.spn3DHeight.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); + + this.linkDefRotation = $('#chart-def-rotate-link'); + $(this.el).on('click', '#chart-def-rotate-link', _.bind(this.onDefRotation, this)); + this.linkAdvanced = $('#chart-advanced-link'); $(this.el).on('click', '#chart-advanced-link', _.bind(this.openAdvancedSettings, this)); this.NotCombinedSettings = $('.not-combined'); + this.Chart3DContainer = $('#chart-panel-3d-rotate'); }, createDelayedElements: function() { @@ -535,6 +789,101 @@ define([ type==Asc.c_oAscChartTypeSettings.comboAreaBar || type==Asc.c_oAscChartTypeSettings.comboCustom); }, + ShowHideElem: function(is3D) { + this.Chart3DContainer.toggleClass('settings-hidden', !is3D); + }, + + onXRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onYRotation: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotY(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onPerspective: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setPerspective(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DDepth: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setDepth(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + on3DHeight: function(field, newValue, oldValue, eOpts){ + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getNumberValue()); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + + onDefRotation: function() { + if (this.api){ + var props = this.api.asc_getChartObject(); + if (props) { + var oView3D = props.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(20); + oView3D.asc_setRotY(15); + props.startEdit(); + props.setView3d(oView3D); + props.endEdit(); + } + } + } + }, + setLocked: function (locked) { this._locked = locked; }, @@ -558,6 +907,21 @@ define([ textEditData: 'Edit Data', textChartType: 'Change Chart Type', textStyle: 'Style', - textAdvanced: 'Show advanced settings' + textAdvanced: 'Show advanced settings', + text3dRotation: '3D Rotation', + textX: 'X rotation', + textY: 'Y rotation', + textPerspective: 'Perspective', + text3dDepth: 'Depth (% of base)', + text3dHeight: 'Height (% of base)', + textLeft: 'Left', + textRight: 'Right', + textUp: 'Up', + textDown: 'Down', + textNarrow: 'Narrow field of view', + textWiden: 'Widen field of view', + textRightAngle: 'Right Angle Axes', + textAutoscale: 'Autoscale', + textDefault: 'Default Rotation' }, PE.Views.ChartSettings || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 9ca95866e..081235881 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1382,6 +1382,21 @@ "PE.Views.ChartSettings.textSize": "Size", "PE.Views.ChartSettings.textStyle": "Style", "PE.Views.ChartSettings.textWidth": "Width", + "PE.Views.ChartSettings.text3dRotation": "3D Rotation", + "PE.Views.ChartSettings.textX": "X rotation", + "PE.Views.ChartSettings.textY": "Y rotation", + "PE.Views.ChartSettings.textPerspective": "Perspective", + "PE.Views.ChartSettings.text3dDepth": "Depth (% of base)", + "PE.Views.ChartSettings.text3dHeight": "Height (% of base)", + "PE.Views.ChartSettings.textLeft": "Left", + "PE.Views.ChartSettings.textRight": "Right", + "PE.Views.ChartSettings.textUp": "Up", + "PE.Views.ChartSettings.textDown": "Down", + "PE.Views.ChartSettings.textNarrow": "Narrow field of view", + "PE.Views.ChartSettings.textWiden": "Widen field of view", + "PE.Views.ChartSettings.textRightAngle": "Right Angle Axes", + "PE.Views.ChartSettings.textAutoscale": "Autoscale", + "PE.Views.ChartSettings.textDefault": "Default Rotation", "PE.Views.ChartSettingsAdvanced.textAlt": "Alternative Text", "PE.Views.ChartSettingsAdvanced.textAltDescription": "Description", "PE.Views.ChartSettingsAdvanced.textAltTip": "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart, or table.", From 36873dc3bc3ce50c2f37c3a97fae685766ea6c18 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 13 Sep 2022 15:34:01 +0300 Subject: [PATCH 7/8] [DE] Fix 3d settings for charts --- .../main/app/view/ChartSettings.js | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/apps/documenteditor/main/app/view/ChartSettings.js b/apps/documenteditor/main/app/view/ChartSettings.js index 29f94772e..ad98ec4e3 100644 --- a/apps/documenteditor/main/app/view/ChartSettings.js +++ b/apps/documenteditor/main/app/view/ChartSettings.js @@ -364,7 +364,7 @@ define([ this.spnX.setValue(this.spnX.getNumberValue() - 10); }, this)); - this.btnRight= new Common.UI.Button({ + this.btnRight = new Common.UI.Button({ parentEl: $('#chart-btn-x-right', me.$el), cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-rotate-90', @@ -783,92 +783,92 @@ define([ }, onXRotation: function(field, newValue, oldValue, eOpts){ - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setRotX(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(field.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, onYRotation: function(field, newValue, oldValue, eOpts){ - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setRotY(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setRotY(field.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, onPerspective: function(field, newValue, oldValue, eOpts){ - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setPerspective(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setPerspective(field.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, on3DDepth: function(field, newValue, oldValue, eOpts){ - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setDepth(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setDepth(field.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, on3DHeight: function(field, newValue, oldValue, eOpts){ - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setHeight(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setHeight(field.getNumberValue()); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, onDefRotation: function() { - if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); - if (oView3D) { - oView3D.asc_setRotX(20); - oView3D.asc_setRotY(15); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); - } + if (this._noApply) return; + + if (this.chartProps) { + var props = new Asc.asc_CImgProperty(); + var oView3D = this.chartProps.getView3d(); + if (oView3D) { + oView3D.asc_setRotX(20); + oView3D.asc_setRotY(15); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ImgApply(props); } } }, From ea2bffa8c2c3d186467375863524626ce661b896 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 13 Sep 2022 16:48:04 +0300 Subject: [PATCH 8/8] [PE] Fix 3d rotation settings for charts --- .../main/app/view/ChartSettings.js | 81 ++++++++++--------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/apps/presentationeditor/main/app/view/ChartSettings.js b/apps/presentationeditor/main/app/view/ChartSettings.js index ce4ef4150..bd6a5e601 100644 --- a/apps/presentationeditor/main/app/view/ChartSettings.js +++ b/apps/presentationeditor/main/app/view/ChartSettings.js @@ -474,6 +474,7 @@ define([ }); this.lockedControls.push(this.chRightAngle); this.chRightAngle.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this._noApply) return; if (this.api){ if (this.chartProps) { var props = new Asc.CAscChartProp(); @@ -494,6 +495,7 @@ define([ }); this.lockedControls.push(this.chAutoscale); this.chAutoscale.on('change', _.bind(function(field, newValue, oldValue, eOpts) { + if (this._noApply) return; if (this.api){ if (this.chartProps) { var props = new Asc.CAscChartProp(); @@ -794,91 +796,98 @@ define([ }, onXRotation: function(field, newValue, oldValue, eOpts){ + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setRotX(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } } }, onYRotation: function(field, newValue, oldValue, eOpts){ + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setRotY(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } } + }, onPerspective: function(field, newValue, oldValue, eOpts){ + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setPerspective(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } } }, on3DDepth: function(field, newValue, oldValue, eOpts){ + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setDepth(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } } }, on3DHeight: function(field, newValue, oldValue, eOpts){ + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setHeight(field.getNumberValue()); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } } }, onDefRotation: function() { + if (this._noApply) return; if (this.api){ - var props = this.api.asc_getChartObject(); - if (props) { - var oView3D = props.getView3d(); + if (this.chartProps) { + var props = new Asc.CAscChartProp(); + var oView3D = this.chartProps.getView3d(); if (oView3D) { oView3D.asc_setRotX(20); oView3D.asc_setRotY(15); - props.startEdit(); - props.setView3d(oView3D); - props.endEdit(); + this.chartProps.putView3d(oView3D); + props.put_ChartProperties(this.chartProps); + this.api.ChartApply(props); } } }