@khanacademy/perseus-editor 18.0.1 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.js CHANGED
@@ -95,7 +95,7 @@ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
95
95
 
96
96
  // This file is processed by a Rollup plugin (replace) to inject the production
97
97
  const libName = "@khanacademy/perseus-editor";
98
- const libVersion = "18.0.1";
98
+ const libVersion = "18.1.0";
99
99
  addLibraryVersionToPerseusDebug(libName, libVersion);
100
100
 
101
101
  const devices = {
@@ -11007,7 +11007,6 @@ class InteractiveGraphSettings extends React.Component {
11007
11007
  static stateFromProps(props) {
11008
11008
  return {
11009
11009
  labelsTextbox: props.labels,
11010
- labelLocation: props.labelLocation,
11011
11010
  gridStepTextbox: props.gridStep,
11012
11011
  snapStepTextbox: props.snapStep,
11013
11012
  stepTextbox: props.step,
@@ -11213,7 +11212,6 @@ class InteractiveGraphSettings extends React.Component {
11213
11212
  };
11214
11213
  this.changeGraph = () => {
11215
11214
  const labels = this.state.labelsTextbox;
11216
- const labelLocation = this.state.labelLocation;
11217
11215
  const range = _.map(this.state.rangeTextbox, function (range) {
11218
11216
  return _.map(range, Number);
11219
11217
  });
@@ -11233,7 +11231,6 @@ class InteractiveGraphSettings extends React.Component {
11233
11231
  this.change({
11234
11232
  valid: true,
11235
11233
  labels: labels,
11236
- labelLocation: labelLocation,
11237
11234
  range: range,
11238
11235
  step: step,
11239
11236
  gridStep: gridStep,
@@ -11257,7 +11254,7 @@ class InteractiveGraphSettings extends React.Component {
11257
11254
  this.changeGraph = _.debounce(this.changeGraph, 300);
11258
11255
  }
11259
11256
  UNSAFE_componentWillReceiveProps(nextProps) {
11260
- if (!_.isEqual(this.props.labels, nextProps.labels) || !_.isEqual(this.props.labelLocation, nextProps.labelLocation) || !_.isEqual(this.props.gridStep, nextProps.gridStep) || !_.isEqual(this.props.snapStep, nextProps.snapStep) || !_.isEqual(this.props.step, nextProps.step) || !_.isEqual(this.props.range, nextProps.range) || !_.isEqual(this.props.backgroundImage, nextProps.backgroundImage)) {
11257
+ if (!_.isEqual(this.props.labels, nextProps.labels) || !_.isEqual(this.props.gridStep, nextProps.gridStep) || !_.isEqual(this.props.snapStep, nextProps.snapStep) || !_.isEqual(this.props.step, nextProps.step) || !_.isEqual(this.props.range, nextProps.range) || !_.isEqual(this.props.backgroundImage, nextProps.backgroundImage)) {
11261
11258
  this.setState(InteractiveGraphSettings.stateFromProps(nextProps));
11262
11259
  }
11263
11260
  }
@@ -11276,21 +11273,6 @@ class InteractiveGraphSettings extends React.Component {
11276
11273
  className: "graph-settings"
11277
11274
  }, /*#__PURE__*/React.createElement("div", {
11278
11275
  className: "perseus-widget-row"
11279
- }, /*#__PURE__*/React.createElement(LabeledRow, {
11280
- label: "Label Location"
11281
- }, /*#__PURE__*/React.createElement(ButtonGroup$1, {
11282
- value: this.props.labelLocation,
11283
- allowEmpty: false,
11284
- buttons: [{
11285
- value: "onAxis",
11286
- content: "On Axis"
11287
- }, {
11288
- value: "alongEdge",
11289
- content: "Along Graph Edge"
11290
- }],
11291
- onChange: this.change("labelLocation")
11292
- }))), /*#__PURE__*/React.createElement("div", {
11293
- className: "perseus-widget-row"
11294
11276
  }, /*#__PURE__*/React.createElement("div", {
11295
11277
  className: "perseus-widget-left-col"
11296
11278
  }, /*#__PURE__*/React.createElement(LabeledRow, {
@@ -11429,7 +11411,6 @@ class InteractiveGraphSettings extends React.Component {
11429
11411
  InteractiveGraphSettings.defaultProps = {
11430
11412
  box: [interactiveSizes.defaultBoxSizeSmall, interactiveSizes.defaultBoxSizeSmall],
11431
11413
  labels: ["$x$", "$y$"],
11432
- labelLocation: "onAxis",
11433
11414
  range: [[-10, 10], [-10, 10]],
11434
11415
  step: [1, 1],
11435
11416
  gridStep: [1, 1],
@@ -14957,7 +14938,7 @@ class InteractiveGraphEditor extends React.Component {
14957
14938
  // is copied from the question editor and pasted into the hint editor
14958
14939
  // (double brackets in the markdown).
14959
14940
  serialize() {
14960
- const json = _.pick(this.props, "step", "backgroundImage", "markings", "labels", "labelLocation", "showProtractor", "showTooltips", "range", "gridStep", "snapStep", "lockedFigures", "fullGraphAriaLabel", "fullGraphAriaDescription");
14941
+ const json = _.pick(this.props, "step", "backgroundImage", "markings", "labels", "showProtractor", "showTooltips", "range", "gridStep", "snapStep", "lockedFigures", "fullGraphAriaLabel", "fullGraphAriaDescription");
14961
14942
 
14962
14943
  // eslint-disable-next-line react/no-string-refs
14963
14944
  const graph = this.refs.graph;
@@ -14996,7 +14977,6 @@ class InteractiveGraphEditor extends React.Component {
14996
14977
  box: this.props.box,
14997
14978
  range: this.props.range,
14998
14979
  labels: this.props.labels,
14999
- labelLocation: this.props.labelLocation,
15000
14980
  step: this.props.step,
15001
14981
  gridStep: gridStep,
15002
14982
  snapStep: snapStep,
@@ -15260,7 +15240,6 @@ class InteractiveGraphEditor extends React.Component {
15260
15240
  box: getInteractiveBoxFromSizeClass(sizeClass),
15261
15241
  range: this.props.range,
15262
15242
  labels: this.props.labels,
15263
- labelLocation: this.props.labelLocation,
15264
15243
  step: this.props.step,
15265
15244
  gridStep: gridStep,
15266
15245
  snapStep: snapStep,