Jun 19, 2012, 1:46 PM
[CLOSED] Resize and Drag
Hi,
Based on these both examples:
https://examples2.ext.net/#/Miscella...sizable/Basic/
https://examples2.ext.net/#/DragDrop...ag_with_State/
We need to resize and drag at the same time, but it looks like a draggable and resizable div is not showing its corresponding size when it is being resized.
Could this be a bug or controls properties must be defined in some other way?
Here is a sample code:
Based on these both examples:
https://examples2.ext.net/#/Miscella...sizable/Basic/
https://examples2.ext.net/#/DragDrop...ag_with_State/
We need to resize and drag at the same time, but it looks like a draggable and resizable div is not showing its corresponding size when it is being resized.
Could this be a bug or controls properties must be defined in some other way?
Here is a sample code:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var startDrag = function (x, y) {
var dragEl = Ext.get(this.getDragEl());
var el = Ext.get(this.getEl());
el.hide();
dragEl.applyStyles({ border: "solid gray 1px" });
dragEl.update(el.dom.innerHTML);
dragEl.addCls(el.dom.className + " dd-proxy");
};
var afterDrag = function () {
var el = Ext.get(this.getEl());
el.show();
if (App.DragArea)
App.DragArea.fireEvent("itemdrag", this);
};
</script>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server" Layout="Fit" AutoScroll="true">
<Content>
<ext:DDProxy runat="server" Target="dd1-item1" Group="tree2div">
<StartDrag Fn="startDrag" />
<AfterDrag Fn="afterDrag" />
</ext:DDProxy>
<ext:Resizer
ID="CustomResizer"
runat="server"
Target="dd1-item1"
Wrap="true"
MinWidth="50"
MinHeight="20"
Handles="All"
Dynamic="true"
/>
</Content>
<Items>
<ext:Panel
runat="server"
Title="Example"
Icon="Application"
Region="Center"
Margins="0">
<Content>
<div id="drop-header" style="border:1px #a0a0a0 solid;margin:20px;padding:8px;height:140px">
<div class="dynamicDiv" id="dd1-item1" style="width: 200px; border: 1px solid silver;">Item 1.1</div>
</div>
</Content>
</ext:Panel>
</Items>
</ext:Viewport>
</body>
Thanks.
Last edited by Daniil; Jun 26, 2012 at 9:12 PM.
Reason: [CLOSED]