@@ -20,7 +20,6 @@ import Heading from "../../../components/heading";
20
20
import LabeledRow from "../locked-figures/labeled-row" ;
21
21
22
22
import type {
23
- AxisLabelLocation ,
24
23
MarkingsType ,
25
24
PerseusImageBackground ,
26
25
} from "@khanacademy/perseus-core" ;
@@ -50,13 +49,6 @@ type Props = {
50
49
* The labels for the x and y axes.
51
50
*/
52
51
labels : ReadonlyArray < string > ;
53
- /**
54
- * Specifies the location of the labels on the graph. default: "onAxis".
55
- * - "onAxis": Labels are positioned on the axis at the right (x) and top (y) of the graph.
56
- * - "alongEdge": Labels are centered along the bottom (x) and left (y) edges of the graph.
57
- * The y label is rotated. Typically used when the range min is near 0 with longer labels.
58
- */
59
- labelLocation : AxisLabelLocation ;
60
52
/**
61
53
* The range of the graph.
62
54
*/
@@ -107,7 +99,6 @@ type Props = {
107
99
type State = {
108
100
isExpanded : boolean ;
109
101
labelsTextbox : ReadonlyArray < string > ;
110
- labelLocation : AxisLabelLocation ;
111
102
gridStepTextbox : [ x : number , y : number ] ;
112
103
snapStepTextbox : [ x : number , y : number ] ;
113
104
stepTextbox : [ x : number , y : number ] ;
@@ -125,7 +116,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
125
116
static stateFromProps ( props : Props ) {
126
117
return {
127
118
labelsTextbox : props . labels ,
128
- labelLocation : props . labelLocation ,
129
119
gridStepTextbox : props . gridStep ,
130
120
snapStepTextbox : props . snapStep ,
131
121
stepTextbox : props . step ,
@@ -150,7 +140,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
150
140
interactiveSizes . defaultBoxSizeSmall ,
151
141
] ,
152
142
labels : [ "$x$" , "$y$" ] ,
153
- labelLocation : "onAxis" ,
154
143
range : [
155
144
[ - 10 , 10 ] ,
156
145
[ - 10 , 10 ] ,
@@ -176,7 +165,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
176
165
UNSAFE_componentWillReceiveProps ( nextProps ) {
177
166
if (
178
167
! _ . isEqual ( this . props . labels , nextProps . labels ) ||
179
- ! _ . isEqual ( this . props . labelLocation , nextProps . labelLocation ) ||
180
168
! _ . isEqual ( this . props . gridStep , nextProps . gridStep ) ||
181
169
! _ . isEqual ( this . props . snapStep , nextProps . snapStep ) ||
182
170
! _ . isEqual ( this . props . step , nextProps . step ) ||
@@ -411,7 +399,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
411
399
412
400
changeGraph = ( ) => {
413
401
const labels = this . state . labelsTextbox ;
414
- const labelLocation = this . state . labelLocation ;
415
402
const range = _ . map ( this . state . rangeTextbox , function ( range ) {
416
403
return _ . map ( range , Number ) ;
417
404
} ) ;
@@ -438,7 +425,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
438
425
this . change ( {
439
426
valid : true ,
440
427
labels : labels ,
441
- labelLocation : labelLocation ,
442
428
range : range ,
443
429
step : step ,
444
430
gridStep : gridStep ,
@@ -466,26 +452,6 @@ class InteractiveGraphSettings extends React.Component<Props, State> {
466
452
{ this . state . isExpanded && (
467
453
< View >
468
454
< div className = "graph-settings" >
469
- < div className = "perseus-widget-row" >
470
- < LabeledRow label = "Label Location" >
471
- < ButtonGroup
472
- value = { this . props . labelLocation }
473
- allowEmpty = { false }
474
- buttons = { [
475
- {
476
- value : "onAxis" ,
477
- content : "On Axis" ,
478
- } ,
479
- {
480
- value : "alongEdge" ,
481
- content : "Along Graph Edge" ,
482
- } ,
483
- ] }
484
- onChange = { this . change ( "labelLocation" ) }
485
- />
486
- </ LabeledRow >
487
- </ div >
488
-
489
455
< div className = "perseus-widget-row" >
490
456
< div className = "perseus-widget-left-col" >
491
457
< LabeledRow label = "x Label" >
0 commit comments