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.6.4 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.3 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.2 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.1 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.6.0 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.5.1 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.5.0 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.32 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.31 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.30 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.29 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.28 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.27 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.26 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.25 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.24 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.23 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.22 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.21 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js
nutella_framework-0.4.20 framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js