diff --git a/apps/documenteditor/main/app/view/ChartSettings.js b/apps/documenteditor/main/app/view/ChartSettings.js index 77089a90f..bdb5851e5 100644 --- a/apps/documenteditor/main/app/view/ChartSettings.js +++ b/apps/documenteditor/main/app/view/ChartSettings.js @@ -357,7 +357,7 @@ define([ }); this.lockedControls.push(this.btnLeft); this.btnLeft.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() - 10); + this.spnX.setValue(Math.ceil((this.spnX.getNumberValue() - 10)/10)*10); }, this)); this.btnRight = new Common.UI.Button({ @@ -370,7 +370,7 @@ define([ }); this.lockedControls.push(this.btnRight); this.btnRight.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() + 10); + this.spnX.setValue(Math.floor((this.spnX.getNumberValue() + 10)/10)*10); }, this)); this.spnY = new Common.UI.MetricSpinner({ @@ -399,7 +399,7 @@ define([ }); this.lockedControls.push(this.btnUp); this.btnUp.on('click', _.bind(function() { - this.spnY.setValue(this.spnY.getNumberValue() - 10); + this.spnY.setValue(Math.ceil((this.spnY.getNumberValue() - 10)/10)*10); }, this)); this.btnDown= new Common.UI.Button({ @@ -412,7 +412,7 @@ define([ }); this.lockedControls.push(this.btnDown); this.btnDown.on('click', _.bind(function() { - this.spnY.setValue(this.spnY.getNumberValue() + 10); + this.spnY.setValue(Math.floor((this.spnY.getNumberValue() + 10)/10)*10); }, this)); this.spnPerspective = new Common.UI.MetricSpinner({ @@ -441,7 +441,7 @@ define([ }); this.lockedControls.push(this.btnNarrow); this.btnNarrow.on('click', _.bind(function() { - this.spnPerspective.setValue(this.spnPerspective.getNumberValue() - 5); + this.spnPerspective.setValue(Math.ceil((this.spnPerspective.getNumberValue() - 5)/5)*5); }, this)); this.btnWiden= new Common.UI.Button({ @@ -454,7 +454,7 @@ define([ }); this.lockedControls.push(this.btnWiden); this.btnWiden.on('click', _.bind(function() { - this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + this.spnPerspective.setValue(Math.floor((this.spnPerspective.getNumberValue() + 5)/5)*5); }, this)); this.chRightAngle = new Common.UI.CheckBox({ diff --git a/apps/presentationeditor/main/app/view/ChartSettings.js b/apps/presentationeditor/main/app/view/ChartSettings.js index a1beac866..1d5196727 100644 --- a/apps/presentationeditor/main/app/view/ChartSettings.js +++ b/apps/presentationeditor/main/app/view/ChartSettings.js @@ -366,7 +366,7 @@ define([ }); this.lockedControls.push(this.btnLeft); this.btnLeft.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() - 10); + this.spnX.setValue(Math.ceil((this.spnX.getNumberValue() - 10)/10)*10); }, this)); this.btnRight= new Common.UI.Button({ @@ -379,7 +379,7 @@ define([ }); this.lockedControls.push(this.btnRight); this.btnRight.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() + 10); + this.spnX.setValue(Math.floor((this.spnX.getNumberValue() + 10)/10)*10); }, this)); this.spnY = new Common.UI.MetricSpinner({ @@ -408,7 +408,7 @@ define([ }); this.lockedControls.push(this.btnUp); this.btnUp.on('click', _.bind(function() { - this.spnY.setValue(this.spnY.getNumberValue() - 10); + this.spnY.setValue(Math.ceil((this.spnY.getNumberValue() - 10)/10)*10); }, this)); this.btnDown= new Common.UI.Button({ @@ -421,7 +421,7 @@ define([ }); this.lockedControls.push(this.btnDown); this.btnDown.on('click', _.bind(function() { - this.spnY.setValue(this.spnY.getNumberValue() + 10); + this.spnY.setValue(Math.floor((this.spnY.getNumberValue() + 10)/10)*10); }, this)); this.spnPerspective = new Common.UI.MetricSpinner({ @@ -450,7 +450,7 @@ define([ }); this.lockedControls.push(this.btnNarrow); this.btnNarrow.on('click', _.bind(function() { - this.spnPerspective.setValue(this.spnPerspective.getNumberValue() - 5); + this.spnPerspective.setValue(Math.ceil((this.spnPerspective.getNumberValue() - 5)/5)*5); }, this)); this.btnWiden= new Common.UI.Button({ @@ -463,7 +463,7 @@ define([ }); this.lockedControls.push(this.btnWiden); this.btnWiden.on('click', _.bind(function() { - this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + this.spnPerspective.setValue(Math.floor((this.spnPerspective.getNumberValue() + 5)/5)*5); }, this)); this.chRightAngle = new Common.UI.CheckBox({ diff --git a/apps/spreadsheeteditor/main/app/view/ChartSettings.js b/apps/spreadsheeteditor/main/app/view/ChartSettings.js index 2bd693270..e4f07f647 100644 --- a/apps/spreadsheeteditor/main/app/view/ChartSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ChartSettings.js @@ -858,7 +858,7 @@ define([ }); this.lockedControls.push(this.btnLeft); this.btnLeft.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() - 10); + this.spnX.setValue(Math.ceil((this.spnX.getNumberValue() - 10)/10)*10); }, this)); this.btnRight= new Common.UI.Button({ @@ -871,7 +871,7 @@ define([ }); this.lockedControls.push(this.btnRight); this.btnRight.on('click', _.bind(function() { - this.spnX.setValue(this.spnX.getNumberValue() + 10); + this.spnX.setValue(Math.floor((this.spnX.getNumberValue() + 10)/10)*10); }, this)); this.spnY = new Common.UI.MetricSpinner({ @@ -900,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(Math.ceil((this.spnY.getNumberValue() - 10)/10)*10); }, this)); this.btnDown= new Common.UI.Button({ @@ -913,7 +913,7 @@ define([ }); this.lockedControls.push(this.btnDown); this.btnDown.on('click', _.bind(function() { - this.spnY.setValue(this.spnY.getNumberValue() + 10); + this.spnY.setValue(Math.floor((this.spnY.getNumberValue() + 10)/10)*10); }, this)); this.spnPerspective = new Common.UI.MetricSpinner({ @@ -942,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(Math.ceil((this.spnPerspective.getNumberValue() - 5)/5)*5); }, this)); this.btnWiden= new Common.UI.Button({ @@ -955,7 +955,7 @@ define([ }); this.lockedControls.push(this.btnWiden); this.btnWiden.on('click', _.bind(function() { - this.spnPerspective.setValue(this.spnPerspective.getNumberValue() + 5); + this.spnPerspective.setValue(Math.floor((this.spnPerspective.getNumberValue() + 5)/5)*5); }, this)); this.chRightAngle = new Common.UI.CheckBox({