PDA

View Full Version : Floating Panel Example



gl-max
11 Sep 2013, 1:25 PM
Hi,

I've been looking at this example page but the panel doesn't seem to move when the buttons are clicked:

http://docs-origin.sencha.com/extjs/4.2.1/guides/components/examples/floating_panel/


Is it just me or is this not working as it should?

Thanks

Max

slemmon
16 Sep 2013, 4:10 PM
Hmm... that page does seem broken indeed. How did you link to it? Is there a link to it in another guide that lead you there?

gl-max
20 Sep 2013, 5:44 AM
Yes, this is linked from the main docs.

In the Guide to components, in the Floating Components section.

http://docs.sencha.com/extjs/4.2.1/#!/guide/components

I looked at it and couldn't see what should be done to fix it up. I'm investigating how floating works because I think I need to use it.

Thanks.

jgrocha
2 Mar 2014, 4:09 PM
i) The example is broken, just because the reference to the CSS is wrong. If you download the example, both app.js and panel.html, you can run it locally, if you fix the CSS link.

ii)The panel disappears if you change its position while hidden. To prevent such, the example should be improved with:


Ext.create('Ext.button.Button', {
renderTo: Ext.getBody(),
margin: 10,
text: 'Align Panel to this button',
handler: function() {
// align the top left corner of the panel to the bottom right corner
// of this button, offset by 3 pixels in each direction
if (panel.isVisible()) {
panel.alignTo(this.getEl(), 'tl-br', [3, 3]);
}
}
});


Ext.create('Ext.button.Button', {
renderTo: Ext.getBody(),
margin: 10,
text: 'Center Panel',
handler: function() {
if (panel.isVisible()) {
panel.center(); // center the panel
}
}
});

igor.tverdovskiy
3 Jul 2014, 4:19 AM
Hi,

http://docs-origin.sencha.com/extjs/4.2.2/guides/components/examples/floating_panel/

still broken

--
Failed to load resource: the server responded with a status of 404 (Not Found) http://docs-origin.sencha.com/extjs/4.2.2/extjs/resources/css/ext-all.css
--

(http://docs-origin.sencha.com/extjs/4.2.2/extjs/resources/css/ext-all.css)Linked from the official documentation:
http://docs.sencha.com/extjs/4.2.2/#!/guide/components
"For a working demo of floating Component features see the Floating Panel Example (http://docs.sencha.com/extjs/4.2.2/guides/components/examples/floating_panel)."

Please fix.