Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutiple dynamic boards #61

Open
vikaskumar-sourcemash opened this issue Jun 6, 2019 · 0 comments
Open

Mutiple dynamic boards #61

vikaskumar-sourcemash opened this issue Jun 6, 2019 · 0 comments

Comments

@vikaskumar-sourcemash
Copy link

I am able to create mutiple dynamic board but addSyncListener's callback is not being called for them. I am pushing the designer object in the array.

`var newDesigner = new CanvasDesigner();

        // you can place widget.html anywhere
        newDesigner.widgetHtmlURL = 'https://rtcmulticonnection.herokuapp.com/node_modules/canvas-designer/widget.html';
        newDesigner.widgetJsURL = 'https://rtcmulticonnection.herokuapp.com/node_modules/canvas-designer/widget.min.js'

        newDesigner.addSyncListener(function(data) {

            connection.send(data);
        });

        newDesigner.setSelected('penci');

        newDesigner.setTools({
            pencil: true,
            text: true,
            image: true,
            pdf: false,
            eraser: true,
            line: true,
            arrow: true,
            dragSingle: true,
            dragMultiple: true,
            arc: true,
            rectangle: true,
            quadratic: false,
            bezier: false,
            marker: true,
            zoom: false,
            lineWidth: false,
            colorsPicker: false,
            extraOptions: false,
            code: false,
            undo: true
        });

        newDesigner.appendTo(document.getElementById(id+'-edit-area'));
        designers.push(newDesigner);`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant