PDA

View Full Version : [OPEN] [#340] Help with drag



xeo4.it
Sep 02, 2013, 1:18 PM
Hi,I don't succeed in resolving this problem, in my example when I move the Panel2 out of the limits, in Firefox works fine while in IE and Chrome the Panel1 moves on top.

the following image shows the result in IE and Chorme
6832

the following image shows the result in Firefox
6833

I need that it always works as in Firefox.Thank you very much.


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<!DOCTYPE html>


<html>
<head id="Head1" runat="server">
<title></title>
<style type="text/css">

.panelBox {
padding: 0px 0px 0px 0px;
border-radius: 0px 0px;

}


</style>
<script>
var startDragF = function (x, y) {


var dragEl = Ext.get(this.getDragEl());
var el = Ext.get(this.getEl());
var extEl = Ext.ComponentMgr.get(el.id);


el.hide();


dragEl.applyStyles({ border: "solid red 1px" });


dragEl.applyStyles({ padding: "0px 0px 0px 0px" });
dragEl.applyStyles("border-radius: 0px 0px");


dragEl.update(el.dom.children[1].innerHTML);
dragEl.setHeight(40);
dragEl.setWidth(40);


dragEl.addCls(el.dom.className + " dd-proxy");
}


var endDragF = function (e) {



Ext.panel.DD.prototype.endDrag.apply(this, arguments);


}




</script>


</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" >

</ext:ResourceManager>



<ext:Panel ID="Panel1"
runat="server"
Title="Test"
Height="590"
Width="590"
Layout="AbsoluteLayout"
Frame="true"
X="0"
Y="0"
StyleSpec="position:absolute;"
BodyStyle= "background-color: #ffffff !important;"
Border="false"
Cls="panelBox"
>
<Items>
<ext:Panel ID="Panel3"
runat="server"
Title="No Drag Me"
Icon="ArrowNsew"
Width="100"
Height="100"
Frame="true"
X="50"
Y="50"
StyleSpec="position:absolute;"
>
<Content>
wa fewq fewq fewq
</Content>
</ext:Panel>


<ext:Panel ID="Panel2"
runat="server"
Title="Drag Me"
Icon="ArrowNsew"
Width="100"
Height="100"
Frame="true"
X="200"
Y="100"
StyleSpec="position:absolute;"
>
<Content>
Bla bla bla bla
</Content>
<DraggablePanelConfig ID="DraggablePanelConfig1" runat="server">
<StartDrag Fn="startDragF"></StartDrag>
<EndDrag Fn="endDragF"></EndDrag>
</DraggablePanelConfig>
</ext:Panel>


</Items>
</ext:Panel>

</body>
</html>

Daniil
Sep 02, 2013, 4:46 PM
Hi @xeo4.it,

Hard to say what might be wrong. Could you, please, provide a test case to investigate?

xeo4.it
Sep 02, 2013, 4:51 PM
Hi Daniil,
sorry, I have corrected my post.
Thank you

Jimmy

Daniil
Sep 03, 2013, 5:27 AM
Thank you for the test case, Jimmy.

It looks a bug. I would expect it behaves in IE and Chrome in the same way as it does in FireFox.

At the moment I cannot see the reason of such the behavior. Reported to Sencha.
http://www.sencha.com/forum/showthread.php?271209

Daniil
Sep 04, 2013, 5:02 AM
Sencha opened a bug.

We created an Issue to track it.
https://github.com/extnet/Ext.NET/issues/340