View Full Version : Attempting to create draggable panel within another panel, stuck in upper left corner

21 Jan 2012, 5:26 PM
I'm attempting to add a small panel within another panel and allow users to drag it around the screen.

Ext.define('CS.view.StartScreen', { extend: 'Ext.panel.Panel',
alias: 'widget.startscreen',
items: [{
xtype: 'panel',
title: 'Hello',
// closable: true,
// collapsible: true,
draggable: true,
// resizable: true,
// maximizable: true,
constrain: true,
height: 300,
width: 300
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
layout: 'hbox',
pack: 'center',
items: [
{xtype: 'button', text: 'Click Me'}

However whenever I attempt to drag the panel it snaps back to the upper left hand corner. Can anyone tell me what I'm doing wrong? Thanks!


22 Jan 2012, 2:40 PM
Any help here guys? Still pretty lost.

22 Jan 2012, 3:18 PM
I've also noticed that in the examples, panels that have the draggable: true property are not draggable. They snap back to their original location instead of remaining where they're dragged to.