@pie-lib/graphing-module 1.13.12 → 1.13.13

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/module/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.9.2/module/index.js";
2
- import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.8.9/module/index.js";
3
- import {_dll_pie_lib__drag} from "../../drag-module@^2.2.11/module/index.js";
4
- import {_dll_pie_lib__config_ui} from "../../config-module@^2.11.5/module/index.js";
1
+ import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.9.3/module/index.js";
2
+ import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.8.10/module/index.js";
3
+ import {_dll_pie_lib__drag} from "../../drag-module@^2.2.12/module/index.js";
4
+ import {_dll_pie_lib__config_ui} from "../../config-module@^2.11.6/module/index.js";
5
5
  const PropTypes$E = _dll_prop_types;
6
6
  const BaseDomainRangeType = {
7
7
  min: PropTypes$E.number.isRequired,
@@ -9633,6 +9633,7 @@ class Bg extends React$t.Component {
9633
9633
  constructor(...args) {
9634
9634
  super(...args);
9635
9635
  Bg.prototype.__init.call(this);
9636
+ Bg.prototype.__init2.call(this);
9636
9637
  }
9637
9638
  static __initStatic() {
9638
9639
  this.propTypes = {
@@ -9653,12 +9654,19 @@ class Bg extends React$t.Component {
9653
9654
  return !isDomainRangeEqual$1(this.props.graphProps, nextProps.graphProps) || this.props.width !== nextProps.width || this.props.height !== nextProps.height;
9654
9655
  }
9655
9656
  __init() {
9657
+ this.getRectPadding = () => {
9658
+ const {graphProps} = this.props;
9659
+ return thinnerShapesNeeded(graphProps) ? 6 : 10;
9660
+ };
9661
+ }
9662
+ __init2() {
9656
9663
  this.onRectClick = rect => {
9657
9664
  const {onClick, graphProps} = this.props;
9658
9665
  const {scale} = graphProps;
9666
+ const padding = this.getRectPadding();
9659
9667
  const coords = mouse(rect._groups[0][0]);
9660
- const x = scale.x.invert(coords[0]);
9661
- const y = scale.y.invert(coords[1]);
9668
+ const x = scale.x.invert(coords[0] - padding);
9669
+ const y = scale.y.invert(coords[1] - padding);
9662
9670
  const rowTicks = getTickValues(graphProps.range);
9663
9671
  const columnTicks = getTickValues(graphProps.domain);
9664
9672
  const closest = (ticks, value) => {
@@ -9680,8 +9688,8 @@ class Bg extends React$t.Component {
9680
9688
  };
9681
9689
  }
9682
9690
  render() {
9683
- const {width, height, graphProps} = this.props;
9684
- const padding = thinnerShapesNeeded(graphProps) ? 6 : 10;
9691
+ const {width, height} = this.props;
9692
+ const padding = this.getRectPadding();
9685
9693
  return React$t.createElement('rect', {
9686
9694
  ref: rect => this.rect = rect,
9687
9695
  transform: `translate(-${padding}, -${padding})`,
@@ -9692,7 +9700,7 @@ class Bg extends React$t.Component {
9692
9700
  __self: this,
9693
9701
  __source: {
9694
9702
  fileName: _jsxFileName$q,
9695
- lineNumber: 73
9703
+ lineNumber: 86
9696
9704
  }
9697
9705
  });
9698
9706
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.13.12",
3
+ "version": "1.13.13",
4
4
  "mappings": {
5
5
  "@pie-lib/plot": "_dll_pie_lib__plot",
6
6
  "@pie-lib/graphing": "_dll_pie_lib__graphing",
@@ -27,19 +27,19 @@
27
27
  "modules": [
28
28
  {
29
29
  "name": "@pie-lib/shared-module",
30
- "version": "^1.9.2"
30
+ "version": "^1.9.3"
31
31
  },
32
32
  {
33
33
  "name": "@pie-lib/editable-html-module",
34
- "version": "^3.8.9"
34
+ "version": "^3.8.10"
35
35
  },
36
36
  {
37
37
  "name": "@pie-lib/drag-module",
38
- "version": "^2.2.11"
38
+ "version": "^2.2.12"
39
39
  },
40
40
  {
41
41
  "name": "@pie-lib/config-module",
42
- "version": "^2.11.5"
42
+ "version": "^2.11.6"
43
43
  }
44
44
  ],
45
45
  "isLocal": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.13.12",
3
+ "version": "1.13.13",
4
4
  "module": "module/index.js",
5
5
  "repository": "pie-framework/pie-lib",
6
6
  "publishConfig": {