Sha256: ca9625bc3e966970c0367a125ed92911dd4b938f0471d1dbba1a63fb2af38e6b

Contents?: true

Size: 1.79 KB

Versions: 40

Compression:

Stored size: 1.79 KB

Contents

var React = require('react');
var Mui = require('material-ui');
var Paper = Mui.Paper;
var d3 = require('d3');

var UploadingScreen = React.createClass({

    componentDidMount: function() {

        d3.xml("./upload.svg", "image/svg+xml", function (logo) {

            d3.select('.uploading-container')[0][0].appendChild(logo.documentElement);

            d3.select('#logo')
                .attr({
                    width: window.innerWidth,
                    height: window.innerHeight
                })
                .style({
                    position: 'fixed',
                    top: '0',
                    'background-color': 'rgba(0,0,0,0.8)',
                    'z-index': '200'
                });

            var colorBlue = function(id) {
                d3.select(id).style({
                    'fill': '#00bcd4'
                });
            };

            var colorPink = function(id) {
                d3.select(id).style({
                    'fill': '#e91e63'
                });
            };

            var removeColor = function() {
                d3.selectAll('rect').style({
                    'fill': null
                });
            };

            var sequence = [1,2,3,4,8,7,6,5];
            var i = 0;
            var action = function() {
                removeColor();
                if(sequence[i] < 5) {
                    colorBlue('#ch' + sequence[i]);
                } else {
                    colorPink('#ch' + sequence[i]);
                }
                i++;
                if(i===sequence.length) {
                    i = 0;
                }
            };

            setInterval(action, 200);

        });

    },

    render: function() {

        return <div className='uploading-container' ></div>;

    }

});

module.exports = UploadingScreen;

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
nutella_framework-0.7.3 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.7.2 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.7.1 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.7.0 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.21 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.20 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.19 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.18 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.17 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.16 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.15 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.13 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.12 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.11 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.10 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.9 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.8 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.7 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.6 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.5 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js