[CLOSED] Question on dragging desktop module

  1. #1

    [CLOSED] Question on dragging desktop module

    Dear support team,

    In your desktop example:https://mvc.ext.net/#/Desktop/Overview/, I am able to make the window move around by dragging the head area of the window. Is there a way to make it work by dragging anywhere within the window?

    Thanks!
    -Susan
    Last edited by fabricio.murta; Nov 25, 2021 at 7:18 PM.
  2. #2
    Hello @Susan!

    Unfortunately windows don't support dragging from anywhere.

    This does not mean the components can't be extended to fulfill your needs though, as per this stack overflow question: How to make an ExtJs window draggable by body? (p.s.: this didn't work for me though)

    The simplest way I found to actually make the window draggable from anywhere -- from a desktop module context -- was to manually specify a "draggable delegate" to the own window element:

    <CustomConfig>
        <ext:ConfigItem Name="draggable" Value="{ delegate: function () { return App.GreetingWindow; } }" Mode="Raw" />
    </CustomConfig>
    But don't get your hopes too high, this seems very unreliable. For instance, I wanted with this retain the original window behavior (draggable by title bar) and the two alternatives below this still makes it draggable from anywhere:

    <ext:ConfigItem Name="draggable" Value="{ delegate: function () { return App.GreetingWindow_header; } }" Mode="Raw" />
    <ext:ConfigItem Name="draggable" Value="{ delegate: function () { return App.GreetingWindow_header.el; } }" Mode="Raw" />
    So it most likely means this works "by chance" and there's no telling how reliably it will behave across browsers and versions (tested on latest, Ext.NET 5.3.0).

    This is really abusing Ext JS as per documentation, the value for draggable should be a boolean true or false. It probably only works because of upper, Ext.Component implementation of the property. So, use it at your own risk. Extending the component should be the way to go in this case.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thank you so much @Fabrício!
    That is all that I want to know.
    You can close this thread now.
    Thanks!
    -susan
  4. #4
    Hello Susan!

    Thanks for the feedback, glad we could provide you the information needed.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Launch the Desktop Module
    By Vamsi in forum 5.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 11, 2020, 8:49 PM
  2. Menu Module in Desktop
    By dtsleite in forum 2.x Help
    Replies: 3
    Last Post: May 08, 2014, 4:49 AM
  3. Selected desktop module ID
    By yash.kapoor in forum 2.x Help
    Replies: 0
    Last Post: Jan 07, 2013, 6:40 AM
  4. How to get the Desktop Module Window Id
    By yash.kapoor in forum 2.x Help
    Replies: 1
    Last Post: Nov 12, 2012, 6:00 AM
  5. Desktop Module JS error
    By fenix2222 in forum Bugs
    Replies: 1
    Last Post: Mar 29, 2009, 2:21 PM

Posting Permissions