Permalink
Browse files

fix project structure

  • Loading branch information...
drcmda committed Jan 4, 2019
1 parent 89df45a commit 8c977dddc02dd96c5af419443699592e54207c41
Showing with 4 additions and 5 deletions.
  1. BIN assets/button.gif
  2. +2 −0 index.d.ts → index.d._ts
  3. +1 −4 {src → }/index.js
  4. +1 −1 rollup.config.js
BIN -1.15 MB assets/button.gif
Binary file not shown.
@@ -1,3 +1,5 @@
// Needs overhaul

import * as React from 'react';

export interface GestureState {
@@ -69,9 +69,6 @@ function handlers(set, props = {}, args) {
const y_dist = pageY - state.xy[1]
const delta_x = pageX - state.initial[0]
const delta_y = pageY - state.initial[1]
const dx = pageX - state.initial[0]
const dy = pageY - state.initial[1]
const distance = Math.sqrt(dx * dx + dy * dy)
const len = Math.sqrt(x_dist * x_dist + y_dist * y_dist)
const scalar = 1 / (len || 1)
const newProps = {
@@ -82,7 +79,7 @@ function handlers(set, props = {}, args) {
delta: [delta_x, delta_y],
local: [state.lastLocal[0] + pageX - state.initial[0], state.lastLocal[1] + pageY - state.initial[1]],
velocity: len / (time - state.time),
distance,
distance: len,
direction: [x_dist * scalar, y_dist * scalar],
previous: state.xy,
first: false
@@ -2,7 +2,7 @@ import babel from 'rollup-plugin-babel'
import pkg from './package.json'

export default {
input: 'src/index.js',
input: 'index.js',
output: [
{ file: `${pkg.main}.js`, format: 'cjs' },
{ file: `${pkg.module}.js`, format: 'es' },

0 comments on commit 8c977dd

Please sign in to comment.