JavaScript Wrap AdobeEdge animation into React.js component

I have AdobeEdge and I need to wrap it inside React.js component.

Component's code:

let ModalWithAnimation = React.createClass({
    render() {
        return (
            <div className="modal-dialog timeslot-modal rc5">
                <div className="modal-content light-grey">
                    <div className="modal-body">
                        <div ref='stage' id="Stage" className="EDGE-18968668">
                        </div>
                    </div>
                </div>
            </div>
        );
    },
    componentDidMount() {
        const compId = 'EDGE-18968668';
        let composition = AdobeEdge.getComposition(compId);
        if (composition) {
            composition.getStage().play();
            return;
        }
        AdobeEdge.loadComposition('/static/animations/rsvp/progress', compId, {
            scaleToFit: "none",
            centerStage: "none",
            minW: "0px",
            maxW: "undefined",
            width: "70px",
            height: "70px"
        }, {
            dom: [ ]
        }, {
            dom: [ ]
        });
    }
});

So, as you see, in componentDidMount method I'm trying to find composition by id and play it. If I don't find composition, it will be loaded by AdobeEdge.loadComposition method.

First time it will load correctly. But when React-component (modal) shows secondly, it don't work.

I think, problem might be because when my component (which is also bootstrap-modal) re-renders, reference to DOM-element inside AdobeEdge composition leads to another DOM-element, which is not in actual DOM. I tried to change reference to actual DOM-element but it still don't work.

What should I do in this situation?

Answer:1

According to this The syntax for adding new elements to the page is easy, so it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you're adding many ...

According to this The syntax for adding new elements to the page is easy, so it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you're adding many ...

I'm new to JS and JQuery, and I'm implementing a simple web app: I used 16 pictures to make a map (4x4 grid). When the user clicks or releases the mouse, the console prints out the mouse's X and Y ...

I'm new to JS and JQuery, and I'm implementing a simple web app: I used 16 pictures to make a map (4x4 grid). When the user clicks or releases the mouse, the console prints out the mouse's X and Y ...

I've created this little fancy jQuery Snippet to toggle the class of an element in an interval: setInterval(function(){$('.grid-item .slide-image').toggleClass('active')}, 800); The script works ...

I've created this little fancy jQuery Snippet to toggle the class of an element in an interval: setInterval(function(){$('.grid-item .slide-image').toggleClass('active')}, 800); The script works ...

  1. jquery toggle class onclick
  2. jquery toggle class animation
  3. jquery toggleclass not working
  4. jquery toggle class on hover
  5. jquery toggle class multiple
  6. jquery toggle class based on boolean
  7. jquery toggle class on button click
  8. jquery toggleclass delay
  9. jquery toggle class hide show
  10. jquery toggle class codepen
  11. jquery toggle class on scroll
  12. jquery toggle class condition
  13. jquery toggle class function
  14. jquery toggle class click
  15. jquery toggle class callback
  16. jquery toggle class by id
  17. jquery toggleclass off
  18. jquery toggle class visibility
  19. jquery toggle class this
  20. jquery toggle class on focus

I am trying to make the angular material directive to render vertically. I have tried using transform:rotate in the CSS but the slider starts behaving and rendering differently. md-slider { ...

I am trying to make the angular material directive to render vertically. I have tried using transform:rotate in the CSS but the slider starts behaving and rendering differently. md-slider { ...

  1. make angular material table responsive
  2. make angular material responsive
  3. make angular material input smaller
  4. how to make angular material dialog draggable
  5. how to make angular material table scrollable
  6. how to make angular material grid responsive
  7. make checkbox readonly angular material
  8. angular material make button smaller
  9. angular material make card clickable
  10. angular material make div scrollable
  11. angular material make icon bigger
  12. angular material make list scrollable
  13. angular material make button bigger
  14. angular material make table editable
  15. angular material make header sticky