Skip to content

Commit

Permalink
v0.0.108
Browse files Browse the repository at this point in the history
  • Loading branch information
hshoff committed May 4, 2017
1 parent 79f822a commit 255e42b
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "0.0.107"
"version": "0.0.108"
}
4 changes: 2 additions & 2 deletions packages/vx-annotation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/annotation",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx annotation",
"main": "build/index.js",
"files": [
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@vx/group": "0.0.100",
"@vx/shape": "0.0.107",
"@vx/shape": "0.0.108",
"classnames": "^2.2.5"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/vx-axis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/axis",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx axis",
"main": "build/index.js",
"scripts": {
Expand Down Expand Up @@ -29,8 +29,8 @@
"homepage": "https://github.com/hshoff/vx#readme",
"dependencies": {
"@vx/group": "0.0.100",
"@vx/point": "0.0.107",
"@vx/shape": "0.0.107",
"@vx/point": "0.0.108",
"@vx/shape": "0.0.108",
"classnames": "^2.2.5",
"react": "^15.4.2"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default ({ source }) => {
return source.split('\n').reduce((lines, line) => {
return lines.concat(line.split(' '));
}, []);
}
4 changes: 2 additions & 2 deletions packages/vx-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/demo",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx demo",
"repository": "https://github.com/hshoff/vx",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"@vx/point": "0.0.84",
"@vx/responsive": "0.0.84",
"@vx/scale": "0.0.92",
"@vx/shape": "0.0.107",
"@vx/shape": "0.0.108",
"@vx/text": "0.0.84",
"classnames": "^2.2.5",
"d3-array": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-event/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/event",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx event",
"main": "build/index.js",
"scripts": {
Expand Down
21 changes: 21 additions & 0 deletions packages/vx-event/src/localPoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Point from '@vx/point';

export default function localPoint(node, event) {
if (!node) return;
const svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {
let point = svg.createSVGPoint();
point.x = event.clientX;
point.y = event.clientY;
point = point.matrixTransform(node.getScreenCTM().inverse());
return new Point({
x: point.x,
y: point.y
});
}
let rect = node.getBoundingClientRect();
return new Point({
x: event.clientX - rect.left - node.clientLeft,
y: event.clientY - rect.top - node.clientTop
});
}
4 changes: 2 additions & 2 deletions packages/vx-grid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/grid",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx grid",
"main": "build/index.js",
"files": [
Expand Down Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@vx/group": "0.0.15",
"@vx/point": "0.0.10",
"@vx/shape": "0.0.107",
"@vx/shape": "0.0.108",
"classnames": "^2.2.5"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/vx-marker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/marker",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx marker",
"main": "build/index.js",
"files": [
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@vx/group": "0.0.100",
"@vx/shape": "0.0.107",
"@vx/shape": "0.0.108",
"classnames": "^2.2.5"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vx-point/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/point",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx point",
"main": "build/index.js",
"repository": "https://github.com/hshoff/vx",
Expand Down
4 changes: 2 additions & 2 deletions packages/vx-shape/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vx/shape",
"version": "0.0.107",
"version": "0.0.108",
"description": "vx shape",
"main": "build/index.js",
"repository": "https://github.com/hshoff/vx",
Expand All @@ -22,7 +22,7 @@
"license": "MIT",
"dependencies": {
"@vx/curve": "0.0.100",
"@vx/point": "0.0.107",
"@vx/point": "0.0.108",
"classnames": "^2.2.5",
"d3-shape": "^1.0.6",
"react": "^15.4.2"
Expand Down

0 comments on commit 255e42b

Please sign in to comment.