jQWidgets Forums

jQuery UI Widgets Forums Layouts Layout and Docking Layout saveLayout not a function

This topic contains 6 replies, has 2 voices, and was last updated by  Yavor Dashev 3 years, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • saveLayout not a function #115258

    Crisium
    Participant

    This part works fine:

    lo = jqwidgets.createInstance(‘#jqxDockingLayout’, ‘jqxDockingLayout’, { width: “100%”, height: “100%”, layout: layout });

    and this part works too

    lo.addFloatGroup( 300, 200, {x:100, y:100}, ‘layoutPanel’, ‘Rates’, <div id="${uid}"></div>);

    so why is it when I try to do a saveLayout by

    lo.saveLayout

    I get a console error stating the saveLayout is not a function?

    saveLayout not a function #115266

    Yavor Dashev
    Participant

    Hi Crisium,

    Thank you for contacting us!

    I have tested the jqxDockingLayout but I was unable to reproduce the error you encounter.
    It will be best to create a code example for us which reproduces the error you do in order to give you the best solution possible.

    However in the mean time you can have a look at this demo:
    https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdockinglayout/index.htm#demos/jqxdockinglayout/javascript-docking-layout-save-load.htm and check if you have all the necessary scripts included.

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

    saveLayout not a function #115273

    Crisium
    Participant

    are you doing exactly the same as above not accessing it using a selector?

    the above code is exactly how it is done, just add () to the saveLayout

    Peter

    saveLayout not a function #115274

    Crisium
    Participant

    I have also looked into the jqxDocking script and can find addFloatGroup but saveLayout is missing? so, I am thinking perhaps there is a script file I need to include?

    saveLayout not a function #115278

    Yavor Dashev
    Participant

    Hi Crisium,

    Thank you for contacting us, again!

    If for your use case you don’t need to use the createInstance method I have code snippet that demonstrates a working example of using saveLayout method for the jqxDockingLayout:

                $('#dockingLayout').jqxDockingLayout({
                    width: getWidth('dockingLayout'),
                    height: 600,
                    layout: layout,
                    contextMenu: true
                });
                setTimeout(() => {
                    var layout = $('#dockingLayout').jqxDockingLayout('saveLayout')
                    
                    console.log(layout)
    
                }, 1000);

    Let me know if that works for you, but if it doesn’t you can share more context of your use case (for example if you are using any JS framework etc)

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

    saveLayout not a function #115280

    Crisium
    Participant

    I actually changed to the way you are showing and it works (a little).. but this is just wrong. I am using imports and exports and the jqxDockingLayout is not typed which means i have to force an <any> around it to just make it compile.

    I can save the layout just fine, the data looks good. The strange part is when I load it my floatGroup gets loaded two times!

    saveLayout not a function #117629

    Yavor Dashev
    Participant

    Hi Crisium,

    As I stated in my previous reply in another topic that you have started it will be best to create a code example for us and give us a bit more context of your use case!

    Please, don’t hesitate to contact us if you have any questions!

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.