From ebbc985d67f1946da7347abcbc1ac22071c1698c Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 26 Jun 2018 16:08:33 +0200 Subject: [PATCH] remove react on touch tap --- index.js | 5 +---- package-lock.json | 19 +++++-------------- package.json | 1 - src/interface/FormComponents.js | 6 +++--- src/interface/Settings.js | 12 ++++++------ src/interface/index.js | 20 ++++++++++---------- 6 files changed, 25 insertions(+), 38 deletions(-) diff --git a/index.js b/index.js index 5c53528..9e8e027 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,8 @@ -import 'babel-polyfill' +import 'babel-polyfill'; import React from 'react'; import { Interface } from 'doodle3d-slicer'; import { render } from 'react-dom'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; -import injectTapEventPlugin from 'react-tap-event-plugin'; import jss from 'jss'; import preset from 'jss-preset-default'; import normalize from 'normalize-jss'; @@ -19,8 +18,6 @@ const muiTheme = getMuiTheme({ } }); -injectTapEventPlugin(); - jss.setup(preset()); jss.createStyleSheet(normalize).attach(); jss.createStyleSheet({ diff --git a/package-lock.json b/package-lock.json index 5ff7d3e..a917917 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ } }, "@doodle3d/doodle3d-core": { - "version": "github:doodle3d/doodle3d-core#ac2256d2c541fb465f959131f6a216574be7f70b", + "version": "github:doodle3d/doodle3d-core#02e312247cc64a5cc1abc03a8e0538602d9bdc98", "requires": { "@doodle3d/cal": "0.0.8", "@doodle3d/clipper-js": "1.0.10", @@ -50,7 +50,7 @@ "font-loaded": "1.0.0", "google-fonts-webpack-plugin": "0.4.4", "imports-loader": "0.7.1", - "jss": "9.8.1", + "jss": "9.8.7", "keycode": "2.1.9", "lodash": "4.17.4", "memoizee": "0.3.10", @@ -77,9 +77,9 @@ }, "dependencies": { "jss": { - "version": "9.8.1", - "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.1.tgz", - "integrity": "sha512-a9dXInEPTRmdSmzw3LNhbAwdQVZgCRmFU7dFzrpLTMAcdolHXNamhxQ6J+PNIqUtWa9yRbZIzWX6aUlI55LZ/A==", + "version": "9.8.7", + "resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz", + "integrity": "sha512-awj3XRZYxbrmmrx9LUSj5pXSUfm12m8xzi/VKeqI1ZwWBtQ0kVPTs3vYs32t4rFw83CgFDukA8wKzOE9sMQnoQ==", "requires": { "is-in-browser": "1.1.3", "symbol-observable": "1.2.0", @@ -9786,15 +9786,6 @@ "prop-types": "15.6.0" } }, - "react-tap-event-plugin": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/react-tap-event-plugin/-/react-tap-event-plugin-3.0.2.tgz", - "integrity": "sha1-KANxZ3uIHDE3bgAnoLhtLG3gOe4=", - "dev": true, - "requires": { - "fbjs": "0.8.16" - } - }, "react-transition-group": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz", diff --git a/package.json b/package.json index e045faf..da974fb 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "material-ui": "^0.19.4", "normalize-jss": "^4.0.0", "raw-loader": "^0.5.1", - "react-tap-event-plugin": "^3.0.2", "webpack": "^3.3.0", "webpack-dev-server": "^2.5.1", "worker-loader": "^0.8.1", diff --git a/src/interface/FormComponents.js b/src/interface/FormComponents.js index 00057d9..949e830 100644 --- a/src/interface/FormComponents.js +++ b/src/interface/FormComponents.js @@ -38,7 +38,7 @@ const _TextField = ({ name, muiTheme: { palette }, ...props }, context) => ( {...props} icon={context.advancedFields.includes(name) && context.onChange(name, null)} + onClick={() => context.onChange(name, null)} />} floatingLabelStyle={{ color: context.advancedFields.includes(name) ? palette.primary1Color : palette.primary3Color @@ -58,7 +58,7 @@ const _NumberField = ({ name, min, max, muiTheme: { palette }, ...props }, conte type="number" icon={context.advancedFields.includes(name) && context.onChange(name, null)} + onClick={() => context.onChange(name, null)} />} floatingLabelStyle={{ color: context.advancedFields.includes(name) ? palette.primary1Color : palette.primary3Color @@ -95,7 +95,7 @@ const _Checkbox = ({ name, muiTheme: { palette }, ...props }, context) => ( onCheck={(event, value) => context.onChange(name, value)} /> {context.advancedFields.includes(name) && context.onChange(name, null)} + onClick={() => context.onChange(name, null)} />} ); diff --git a/src/interface/Settings.js b/src/interface/Settings.js index 4872299..9eb004a 100644 --- a/src/interface/Settings.js +++ b/src/interface/Settings.js @@ -415,10 +415,10 @@ class Settings extends React.Component { ))} - + {localStorage.active && } @@ -525,16 +525,16 @@ function printDialog(props, state, title, form, submitText, data, closeDialog, r actions={[ closeDialog && , removeActivePrinter && , ]} > @@ -551,7 +551,7 @@ function printDialog(props, state, title, form, submitText, data, closeDialog, r {wifiBoxes.map(({ localip, id, wifiboxid }) => ())} {data.ip && window.open(`${CONNECT_URL}/?uuid=0#control?localip=${data.ip}`, '_blank')} + onClick={() => window.open(`${CONNECT_URL}/?uuid=0#control?localip=${data.ip}`, '_blank')} style={{ fill: grey800, marginLeft: '10px', cursor: 'pointer' }} />} diff --git a/src/interface/index.js b/src/interface/index.js index 294ea3a..3500cec 100644 --- a/src/interface/index.js +++ b/src/interface/index.js @@ -357,13 +357,13 @@ class Interface extends React.Component { {onCancel && } {actions.length === 1 ? ( this.slice(actions[0])} + onClick={() => this.slice(actions[0])} className={`${classes.button}`} disabled={isSlicing} /> @@ -374,7 +374,7 @@ class Interface extends React.Component { ref="button" primary className={`${classes.button}`} - onTouchTap={this.openPopover} + onClick={this.openPopover} disabled={isSlicing} /> {actions.map((action) => ( - this.slice(action)} /> + this.slice(action)} /> ))} @@ -405,12 +405,12 @@ class Interface extends React.Component {

Dimensions: {objectDimensions}

- - - - - - + + + + + + );