jQWidgets Forums

jQuery UI Widgets Forums Layouts Docking mode 'docked' not working ?

Tagged: 

This topic contains 4 replies, has 3 voices, and was last updated by  Peter Stoev 11 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • mode 'docked' not working ? #22879

    stephan
    Participant

    Hi,

    I have created a simple fiddle where I create one docking panel with 2 windows. By setting the ‘mode’ to ‘docking’ I want to prevent that windows can be dropped outside of the docking container. This however does not seemt o work, as you can still drag and drop the windows outside the dock container:

    http://jsfiddle.net/qMQhg/1/

    What am I doing wrong ?

    Regards,
    Stephan

    mode 'docked' not working ? #23010

    Peter Stoev
    Keymaster

    Hi,

    To disable the dragging of a window, use the “pinWindow” method.

      $('#docking').jqxDocking('pinWindow', 'window1');

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    mode 'docked' not working ? #23072

    stephan
    Participant

    Hi Peter,

    The problem I’m having is that the mode ‘docking’ does not appear to work correctly. I want to drag windows, but only between the docking points. I thought that’s what ‘docking ‘ is meant to do. Maybe I misunderstood the meaning of the “docking” mode? My fiddle above demonstrates that you can drag a window to any position, even outside the docking points, when mode “Docking” is set.

    Regards,
    Stephan

    mode 'docked' not working ? #24485

    khaldryck
    Member

    i got the same problem,
    i set the docking mode to “docked”, but see no difference with the default mode

    i can still drag windows anywhere outside the docking, and they become floating.
    isn’t “docked” mode preventing any window to become floating ?

    anyway, i wrote a few lines of codes to get the docked behaviour (might be slower, but it works fine for me)
    the key is to use the dragEnd event, check the layout and put back any floating window into the docking again.

    $('#docking').on('dragEnd', function() {
    var layout = JSON.parse($('#docking').jqxDocking('exportLayout'));
    $.each(layout.floating, function(k) {
    //items is a global array containing all the id of the windows in the docking
    //using it's length allows us to put the floating window back in last position
    $('docking').jqxDocking('move', k, 0, items.length);
    });
    });

    I have to go through the exportLayout as there is no way to get information about the window except it’s id from the event.

    I hope this help

    regards
    Khaldryck

    mode 'docked' not working ? #24487

    Peter Stoev
    Keymaster

    Hi,

    “mode” docked works as expected in the current version – jQWidgets 2.9.1. If you use an earlier version, please consider upgrading to the latest one.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.