diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-22 20:08:32 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-22 20:08:32 +0200 |
| commit | f3885f7d43dffe4e0fcf49e3e8f9f9e248bc6f76 (patch) | |
| tree | 2a6b3d92c91790bf13cf436e24d14f76be4ef0ab /app/client/common | |
| parent | cb252ec2533fb4d2cd739d60da7c5e9a8494fba5 (diff) | |
thumbnail
Diffstat (limited to 'app/client/common')
| -rw-r--r-- | app/client/common/fileViewer.component.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/client/common/fileViewer.component.js b/app/client/common/fileViewer.component.js index d9f3f4b..d98073b 100644 --- a/app/client/common/fileViewer.component.js +++ b/app/client/common/fileViewer.component.js @@ -36,25 +36,27 @@ class FileViewer extends Component { return } const fn = [path || file.path, file.name].join('/').replace('//','/') - console.log('fetch file', fn) const { tool: module } = this.props.app this.setState({ buffer: null, loading: true }) if (thumbnail) { + console.log('fetch thumbnail', fn) const size = parseInt(thumbnail) || 200 actions.socket .thumbnail({ module, fn, size }) .then(this.loadBuffer.bind(this)) } else { + console.log('fetch file', fn) actions.socket .read_file({ module, fn }) .then(this.loadBuffer.bind(this)) } } loadBuffer(buffer) { - console.log('fetched buffer') + console.log('fetched buffer', buffer) const { stale } = this.state this.setState({ buffer, loading: false, stale: false, }, () => { + console.log('loaded') if (stale) { console.log('stale, fetching...') this.fetch() |
