Dear All
I am triggering this function by a button
<ej:Button ID="btnFitToPage" runat="server" Text="FitToPage" CssClass="button" ClientSideOnClick="fittopage" ShowRoundedCorner="true"></ej:Button>
<asp:Content ID="Scripts" ContentPlaceHolderID="ScriptSection" runat="server">
<script type="text/javascript">
function fittopage(e) {
var diagram = $("#diagram").ejDiagram("instance");
diagram.fitToPage("page", {
left: 5,
top: 5,
right: 5,
bottom: 5
});
}
</script>
</asp:Content>
As I can see the resize is working as expected, but 3 seconds later the page is cleared.
What did I do wrong?
Thanks for help
Martin