From b92b633cf0c2d528e45c04828a9ce1f5679aeaa3 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 6 Jun 2018 04:16:37 +0200 Subject: frame count slider --- app/client/modules/pix2pix/views/pix2pix.live.js | 32 +++++++-------- .../modules/pix2wav/views/spectrogram.upload.js | 45 ++++++++++++++-------- 2 files changed, 44 insertions(+), 33 deletions(-) (limited to 'app/client/modules') diff --git a/app/client/modules/pix2pix/views/pix2pix.live.js b/app/client/modules/pix2pix/views/pix2pix.live.js index fc6bc9b..eebb364 100644 --- a/app/client/modules/pix2pix/views/pix2pix.live.js +++ b/app/client/modules/pix2pix/views/pix2pix.live.js @@ -93,7 +93,7 @@ class Pix2PixLive extends Component { options={this.props.epochs} onChange={this.changeEpoch} /> - - - - @@ -148,15 +148,15 @@ class Pix2PixLive extends Component { title='Recursion' name='recursive' > - - - @@ -166,11 +166,11 @@ class Pix2PixLive extends Component { title='Sequence' name='sequence' > - - @@ -181,7 +181,7 @@ class Pix2PixLive extends Component { title='Clahe' name='clahe' > - @@ -191,11 +191,11 @@ class Pix2PixLive extends Component { title='Posterize' name='posterize' > - - @@ -205,11 +205,11 @@ class Pix2PixLive extends Component { title='Blur' name='blur' > - - @@ -219,11 +219,11 @@ class Pix2PixLive extends Component { title='Canny Edge Detection' name='canny' > - - diff --git a/app/client/modules/pix2wav/views/spectrogram.upload.js b/app/client/modules/pix2wav/views/spectrogram.upload.js index 0279e80..087af6a 100644 --- a/app/client/modules/pix2wav/views/spectrogram.upload.js +++ b/app/client/modules/pix2wav/views/spectrogram.upload.js @@ -9,7 +9,7 @@ import * as pix2wavTasks from '../pix2wav.tasks' import { Loading, Progress, - Group, Param, FileUpload, TextInput, Button + Group, Param, FileUpload, TextInput, Button, Slider, } from '../../../common' import * as datasetActions from '../../../dataset/dataset.actions' @@ -24,6 +24,7 @@ class SpectrogramUpload extends Component { file: null, name: "", frames: [], + max: 3000, } const audioElement = document.createElement('audio') audioElement.addEventListener('loadedmetadata', () => { @@ -66,7 +67,6 @@ class SpectrogramUpload extends Component { // module={pix2wavModule} // data={pix2wav.data} // folder={folder} - console.log(this.props) const { file, frames } = this.state return (
@@ -98,21 +98,32 @@ class SpectrogramUpload extends Component {

Careful, your file is larger than 2 MB.

} - {file.name} - {file.type} - {size[1]} - {moment(file.lastModifiedDate).format("YYYY-MM-DD h:mm a")} - {Math.floor(duration) + ' s.'} -
- {this.props.pix2wav.status}{this.props.upload.status} - this.setState({ name: e.target.value })} - value={this.state.name} - /> - + + {file.name} + {file.type} + {size[1]} + {moment(file.lastModifiedDate).format("YYYY-MM-DD h:mm a")} + {Math.floor(duration) + ' s.'} +
+ {this.props.pix2wav.status}{this.props.upload.status} +
+
+ + this.setState({ name: e.target.value })} + value={this.state.name} + /> + this.setState({ max })} + /> + +
) -- cgit v1.2.3-70-g09d2