mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-25 06:57:58 +01:00
remove react on touch tap
This commit is contained in:
parent
246f1627c5
commit
ebbc985d67
5
index.js
5
index.js
@ -1,9 +1,8 @@
|
|||||||
import 'babel-polyfill'
|
import 'babel-polyfill';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Interface } from 'doodle3d-slicer';
|
import { Interface } from 'doodle3d-slicer';
|
||||||
import { render } from 'react-dom';
|
import { render } from 'react-dom';
|
||||||
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
|
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
|
||||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
|
||||||
import jss from 'jss';
|
import jss from 'jss';
|
||||||
import preset from 'jss-preset-default';
|
import preset from 'jss-preset-default';
|
||||||
import normalize from 'normalize-jss';
|
import normalize from 'normalize-jss';
|
||||||
@ -19,8 +18,6 @@ const muiTheme = getMuiTheme({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
injectTapEventPlugin();
|
|
||||||
|
|
||||||
jss.setup(preset());
|
jss.setup(preset());
|
||||||
jss.createStyleSheet(normalize).attach();
|
jss.createStyleSheet(normalize).attach();
|
||||||
jss.createStyleSheet({
|
jss.createStyleSheet({
|
||||||
|
19
package-lock.json
generated
19
package-lock.json
generated
@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@doodle3d/doodle3d-core": {
|
"@doodle3d/doodle3d-core": {
|
||||||
"version": "github:doodle3d/doodle3d-core#ac2256d2c541fb465f959131f6a216574be7f70b",
|
"version": "github:doodle3d/doodle3d-core#02e312247cc64a5cc1abc03a8e0538602d9bdc98",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@doodle3d/cal": "0.0.8",
|
"@doodle3d/cal": "0.0.8",
|
||||||
"@doodle3d/clipper-js": "1.0.10",
|
"@doodle3d/clipper-js": "1.0.10",
|
||||||
@ -50,7 +50,7 @@
|
|||||||
"font-loaded": "1.0.0",
|
"font-loaded": "1.0.0",
|
||||||
"google-fonts-webpack-plugin": "0.4.4",
|
"google-fonts-webpack-plugin": "0.4.4",
|
||||||
"imports-loader": "0.7.1",
|
"imports-loader": "0.7.1",
|
||||||
"jss": "9.8.1",
|
"jss": "9.8.7",
|
||||||
"keycode": "2.1.9",
|
"keycode": "2.1.9",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
"memoizee": "0.3.10",
|
"memoizee": "0.3.10",
|
||||||
@ -77,9 +77,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jss": {
|
"jss": {
|
||||||
"version": "9.8.1",
|
"version": "9.8.7",
|
||||||
"resolved": "https://registry.npmjs.org/jss/-/jss-9.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz",
|
||||||
"integrity": "sha512-a9dXInEPTRmdSmzw3LNhbAwdQVZgCRmFU7dFzrpLTMAcdolHXNamhxQ6J+PNIqUtWa9yRbZIzWX6aUlI55LZ/A==",
|
"integrity": "sha512-awj3XRZYxbrmmrx9LUSj5pXSUfm12m8xzi/VKeqI1ZwWBtQ0kVPTs3vYs32t4rFw83CgFDukA8wKzOE9sMQnoQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-in-browser": "1.1.3",
|
"is-in-browser": "1.1.3",
|
||||||
"symbol-observable": "1.2.0",
|
"symbol-observable": "1.2.0",
|
||||||
@ -9786,15 +9786,6 @@
|
|||||||
"prop-types": "15.6.0"
|
"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": {
|
"react-transition-group": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz",
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
"material-ui": "^0.19.4",
|
"material-ui": "^0.19.4",
|
||||||
"normalize-jss": "^4.0.0",
|
"normalize-jss": "^4.0.0",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"react-tap-event-plugin": "^3.0.2",
|
|
||||||
"webpack": "^3.3.0",
|
"webpack": "^3.3.0",
|
||||||
"webpack-dev-server": "^2.5.1",
|
"webpack-dev-server": "^2.5.1",
|
||||||
"worker-loader": "^0.8.1",
|
"worker-loader": "^0.8.1",
|
||||||
|
@ -38,7 +38,7 @@ const _TextField = ({ name, muiTheme: { palette }, ...props }, context) => (
|
|||||||
{...props}
|
{...props}
|
||||||
icon={context.advancedFields.includes(name) && <RefreshIcon
|
icon={context.advancedFields.includes(name) && <RefreshIcon
|
||||||
style={{ fill: palette.textColor }}
|
style={{ fill: palette.textColor }}
|
||||||
onTouchTap={() => context.onChange(name, null)}
|
onClick={() => context.onChange(name, null)}
|
||||||
/>}
|
/>}
|
||||||
floatingLabelStyle={{
|
floatingLabelStyle={{
|
||||||
color: context.advancedFields.includes(name) ? palette.primary1Color : palette.primary3Color
|
color: context.advancedFields.includes(name) ? palette.primary1Color : palette.primary3Color
|
||||||
@ -58,7 +58,7 @@ const _NumberField = ({ name, min, max, muiTheme: { palette }, ...props }, conte
|
|||||||
type="number"
|
type="number"
|
||||||
icon={context.advancedFields.includes(name) && <RefreshIcon
|
icon={context.advancedFields.includes(name) && <RefreshIcon
|
||||||
style={{ fill: palette.textColor }}
|
style={{ fill: palette.textColor }}
|
||||||
onTouchTap={() => context.onChange(name, null)}
|
onClick={() => context.onChange(name, null)}
|
||||||
/>}
|
/>}
|
||||||
floatingLabelStyle={{
|
floatingLabelStyle={{
|
||||||
color: context.advancedFields.includes(name) ? palette.primary1Color : palette.primary3Color
|
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)}
|
onCheck={(event, value) => context.onChange(name, value)}
|
||||||
/>
|
/>
|
||||||
{context.advancedFields.includes(name) && <RefreshIcon
|
{context.advancedFields.includes(name) && <RefreshIcon
|
||||||
onTouchTap={() => context.onChange(name, null)}
|
onClick={() => context.onChange(name, null)}
|
||||||
/>}
|
/>}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -415,10 +415,10 @@ class Settings extends React.Component {
|
|||||||
<MenuItem key={id} value={id} primaryText={name} />
|
<MenuItem key={id} value={id} primaryText={name} />
|
||||||
))}
|
))}
|
||||||
<Divider />
|
<Divider />
|
||||||
<MenuItem onTouchTap={this.openAddPrinterDialog} value="add_printer" primaryText="Add Printer" />
|
<MenuItem onClick={this.openAddPrinterDialog} value="add_printer" primaryText="Add Printer" />
|
||||||
</SelectField>
|
</SelectField>
|
||||||
{localStorage.active && <SettingsIcon
|
{localStorage.active && <SettingsIcon
|
||||||
onTouchTap={this.openManagePrinterDialog}
|
onClick={this.openManagePrinterDialog}
|
||||||
style={{ fill: grey800, marginLeft: '10px', cursor: 'pointer' }}
|
style={{ fill: grey800, marginLeft: '10px', cursor: 'pointer' }}
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
@ -525,16 +525,16 @@ function printDialog(props, state, title, form, submitText, data, closeDialog, r
|
|||||||
actions={[
|
actions={[
|
||||||
closeDialog && <FlatButton
|
closeDialog && <FlatButton
|
||||||
label="Close"
|
label="Close"
|
||||||
onTouchTap={closeDialog}
|
onClick={closeDialog}
|
||||||
/>,
|
/>,
|
||||||
removeActivePrinter && <FlatButton
|
removeActivePrinter && <FlatButton
|
||||||
label="Remove Printer"
|
label="Remove Printer"
|
||||||
onTouchTap={removeActivePrinter}
|
onClick={removeActivePrinter}
|
||||||
/>,
|
/>,
|
||||||
<RaisedButton
|
<RaisedButton
|
||||||
label={submitText}
|
label={submitText}
|
||||||
primary
|
primary
|
||||||
onTouchTap={save}
|
onClick={save}
|
||||||
/>
|
/>
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
@ -551,7 +551,7 @@ function printDialog(props, state, title, form, submitText, data, closeDialog, r
|
|||||||
{wifiBoxes.map(({ localip, id, wifiboxid }) => (<MenuItem key={id} value={localip} primaryText={wifiboxid} />))}
|
{wifiBoxes.map(({ localip, id, wifiboxid }) => (<MenuItem key={id} value={localip} primaryText={wifiboxid} />))}
|
||||||
</SelectField>
|
</SelectField>
|
||||||
{data.ip && <ExitToAppIcon
|
{data.ip && <ExitToAppIcon
|
||||||
onTouchTap={() => 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' }}
|
style={{ fill: grey800, marginLeft: '10px', cursor: 'pointer' }}
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
@ -357,13 +357,13 @@ class Interface extends React.Component {
|
|||||||
{onCancel && <RaisedButton
|
{onCancel && <RaisedButton
|
||||||
label="Close"
|
label="Close"
|
||||||
className={`${classes.button}`}
|
className={`${classes.button}`}
|
||||||
onTouchTap={onCancel}
|
onClick={onCancel}
|
||||||
/>}
|
/>}
|
||||||
{actions.length === 1 ? (
|
{actions.length === 1 ? (
|
||||||
<RaisedButton
|
<RaisedButton
|
||||||
primary
|
primary
|
||||||
label={actions[0].title}
|
label={actions[0].title}
|
||||||
onTouchTap={() => this.slice(actions[0])}
|
onClick={() => this.slice(actions[0])}
|
||||||
className={`${classes.button}`}
|
className={`${classes.button}`}
|
||||||
disabled={isSlicing}
|
disabled={isSlicing}
|
||||||
/>
|
/>
|
||||||
@ -374,7 +374,7 @@ class Interface extends React.Component {
|
|||||||
ref="button"
|
ref="button"
|
||||||
primary
|
primary
|
||||||
className={`${classes.button}`}
|
className={`${classes.button}`}
|
||||||
onTouchTap={this.openPopover}
|
onClick={this.openPopover}
|
||||||
disabled={isSlicing}
|
disabled={isSlicing}
|
||||||
/>
|
/>
|
||||||
<Popover
|
<Popover
|
||||||
@ -386,7 +386,7 @@ class Interface extends React.Component {
|
|||||||
>
|
>
|
||||||
<Menu>
|
<Menu>
|
||||||
{actions.map((action) => (
|
{actions.map((action) => (
|
||||||
<MenuItem key={action.target} primaryText={action.title} onTouchTap={() => this.slice(action)} />
|
<MenuItem key={action.target} primaryText={action.title} onClick={() => this.slice(action)} />
|
||||||
))}
|
))}
|
||||||
</Menu>
|
</Menu>
|
||||||
</Popover>
|
</Popover>
|
||||||
@ -405,12 +405,12 @@ class Interface extends React.Component {
|
|||||||
<div className={classes.detail}>
|
<div className={classes.detail}>
|
||||||
<p>Dimensions: {objectDimensions}</p>
|
<p>Dimensions: {objectDimensions}</p>
|
||||||
</div>
|
</div>
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.resetMesh} label="reset" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.resetMesh} label="reset" />
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.scaleUp} label="scale down" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.scaleUp} label="scale down" />
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.scaleDown} label="scale up" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.scaleDown} label="scale up" />
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.rotateX} label="rotate x" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.rotateX} label="rotate x" />
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.rotateY} label="rotate y" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.rotateY} label="rotate y" />
|
||||||
<RaisedButton disabled={isSlicing} className={classes.controlButton} onTouchTap={this.rotateZ} label="rotate z" />
|
<RaisedButton disabled={isSlicing} className={classes.controlButton} onClick={this.rotateZ} label="rotate z" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user