FormidableLabs / spectacle

A React-based library for creating sleek presentations using JSX syntax that gives you the ability to live demo your code.
https://commerce.nearform.com/open-source/spectacle/
MIT License
9.78k stars 694 forks source link

Load one json over other #444

Closed amitnkukanur closed 6 years ago

amitnkukanur commented 6 years ago

Hi,

Am trying to load one json over other, its like embossing one model over other. The below is my code. The problem am getting is its adding a new json to other area, not on same area.

` var mySpectacles; $('#btnLoadJson').on('click', function() { $.getJSON("json1.json", function(data) { alert('a'); mySpectacles = new SPECTACLES($("#Spectacles_output"),data,function(app) {});

            });

        });

        $('#btnLoadJson2').on('click', function() {
            $.getJSON("json2.json", function(data) {
                mySpectacles = new SPECTACLES($("#Spectacles_output"),data,function(app) {
                    app.setBackgroundColor(0xFFFFFF);
                }
                );
            });
        });`

Please suggest how can i place one json over other.

Rgds, Amit

kitten commented 6 years ago

I'm a little confused :wink: I think you've got the wrong "spectacle" project here. Please be more careful next time.

Either way, this is likely a question that belongs on StackOverflow, and not into GitHub issues.

ryan-roemer commented 6 years ago

Ah, yeah -- looks like this project https://github.com/tt-acm/Spectacles.WebViewer

amitnkukanur commented 6 years ago

@philpl - Sure i will be carefull regarding same.. @ryan-roemer - Thanks for guiding me to right plac

Thanks for Info Gentlemen.

Cheers, Amit