Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:07:01+00:00 2026-05-15T23:07:01+00:00

I have an Ext.Container and I need to add to it a user-movable object.

  • 0

I have an Ext.Container and I need to add to it a user-movable object.

I see elsewhere that an Ext.Window is not supposed to be nested into objects, thus what are my options regarding other movable Ext objects?

Regards, Casper

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:07:01+00:00Added an answer on May 15, 2026 at 11:07 pm

    Returning to this problem, your suggestions helped me along the way. The ExtJS documentation for a panel suggest how to do a custom implementation of draggable.

    draggable: {
    //  Config option of Ext.Panel.DD class.
    //  It's a floating Panel, so do not show a placeholder proxy in the original position.
        insertProxy: false,
    
    //  Called for each mousemove event while dragging the DD object.
        onDrag : function(e){
    //      Record the x,y position of the drag proxy so that we can
    //      position the Panel at end of drag.
            var pel = this.proxy.getEl();
            this.x = pel.getLeft(true);
            this.y = pel.getTop(true);
    
    //      Keep the Shadow aligned if there is one.
            var s = this.panel.getEl().shadow;
            if (s) {
                s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());
            }
        },
    
    //  Called on the mouseup event.
        endDrag : function(e){
            this.panel.setPosition(this.x, this.y);
        }
    }
    

    In my project, I needed draggable elements inside a container element, thus I needed to do something extra.
    Why?
    Because retrieving any position information is done in browser-window-space and setting the position seems to be in parent-space. Thus I needed to translate the position before setting the final panel position.

    //  Called on the mouseup event.
    endDrag: function (e) {
        if (this.panel.ownerCt) {
            var parentPosition = this.panel.ownerCt.getPosition();
            this.panel.setPosition(this.x - parentPosition[0], this.y - parentPosition[1]);
        } else {
            this.panel.setPosition(this.x, this.y);
        }
    }
    

    I hope this can help others and again thanks a lot for your inputs 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Sencha Touch, I often need to have an Ext.DataView panel that contains a
I have a web application that uses Ext-JS 2.2. In a certain component, we
I have a some class AddOrgWindowUI = Ext.extend(Ext.Window, { title: 'form', width: 400, height:
I have constuctor (window + formPanel) AddOrgWindowUI = Ext.extend(Ext.Window, { title: 'Create something', width:
I have an Ext Js panel that I am adding to my main TabPanel.
In an Ext Js-application I am working on I have a formpanel that contains
I have the following very simple Ext JS 4 script which is supposed to
My problem is :: From a string like /usr/folder1/folder2/filename.ext I have to extract out
ExtJS has Ext.each() function, but is there a map() also hidden somewhere? I have
I have a string of text that contains html with all different types of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.