File tree 2 files changed +24
-8
lines changed
2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ Sidebar.Object = function ( editor ) {
109
109
// rotation
110
110
111
111
var objectRotationRow = new UI . Row ( ) ;
112
- var objectRotationX = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
113
- var objectRotationY = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
114
- var objectRotationZ = new UI . Number ( ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
112
+ var objectRotationX = new UI . Number ( ) . setStep ( 10 ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
113
+ var objectRotationY = new UI . Number ( ) . setStep ( 10 ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
114
+ var objectRotationZ = new UI . Number ( ) . setStep ( 10 ) . setUnit ( '°' ) . setWidth ( '50px' ) . onChange ( update ) ;
115
115
116
116
objectRotationRow . add ( new UI . Text ( 'Rotation' ) . setWidth ( '90px' ) ) ;
117
117
objectRotationRow . add ( objectRotationX , objectRotationY , objectRotationZ ) ;
Original file line number Diff line number Diff line change @@ -808,18 +808,26 @@ UI.Number.prototype.setValue = function ( value ) {
808
808
809
809
} ;
810
810
811
- UI . Number . prototype . setRange = function ( min , max ) {
811
+ UI . Number . prototype . setPrecision = function ( precision ) {
812
812
813
- this . min = min ;
814
- this . max = max ;
813
+ this . precision = precision ;
815
814
816
815
return this ;
817
816
818
817
} ;
819
818
820
- UI . Number . prototype . setPrecision = function ( precision ) {
819
+ UI . Number . prototype . setStep = function ( step ) {
821
820
822
- this . precision = precision ;
821
+ this . step = step ;
822
+
823
+ return this ;
824
+
825
+ } ;
826
+
827
+ UI . Number . prototype . setRange = function ( min , max ) {
828
+
829
+ this . min = min ;
830
+ this . max = max ;
823
831
824
832
return this ;
825
833
@@ -977,6 +985,14 @@ UI.Integer.prototype.setValue = function ( value ) {
977
985
978
986
} ;
979
987
988
+ UI . Number . prototype . setStep = function ( step ) {
989
+
990
+ this . step = step ;
991
+
992
+ return this ;
993
+
994
+ } ;
995
+
980
996
UI . Integer . prototype . setRange = function ( min , max ) {
981
997
982
998
this . min = min ;
You can’t perform that action at this time.
0 commit comments