~cdparra/gelee/trunk

« back to all changes in this revision

Viewing changes to webui/ecosystem/workspace/extjs/docs/source/basic1.html

  • Committer: parra
  • Date: 2010-03-15 15:56:56 UTC
  • Revision ID: svn-v4:ac5bba68-f036-4e09-846e-8f32731cc928:trunk/gelee:1448
merged gelee at svn

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
  <title>The source code</title>
 
4
    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
 
5
    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
 
6
</head>
 
7
<body  onload="prettyPrint();">
 
8
    <pre class="prettyprint lang-js">var ResizableExample = {
 
9
    init : function(){
 
10
        
 
11
        var basic = new Ext.Resizable('basic', {
 
12
                width: 200,
 
13
                height: 100,
 
14
                minWidth:100,
 
15
                minHeight:50
 
16
        });
 
17
        
 
18
        var animated = new Ext.Resizable('animated', {
 
19
                width: 200,
 
20
                pinned: true,
 
21
                height: 100,
 
22
                minWidth:100,
 
23
                minHeight:50,
 
24
                animate:true,
 
25
                easing: 'backIn',
 
26
                duration:.6
 
27
        });
 
28
        
 
29
        var wrapped = new Ext.Resizable('wrapped', {
 
30
            wrap:true,
 
31
            pinned:true,
 
32
            minWidth:50,
 
33
            minHeight: 50,
 
34
            preserveRatio: true
 
35
        });
 
36
        
 
37
        var transparent = new Ext.Resizable('transparent', {
 
38
            wrap:true,
 
39
            minWidth:50,
 
40
            minHeight: 50,
 
41
            preserveRatio: true,
 
42
            transparent:true
 
43
        });
 
44
        
 
45
        var custom = new Ext.Resizable('custom', {
 
46
            wrap:true,
 
47
            pinned:true,
 
48
            minWidth:50,
 
49
            minHeight: 50,
 
50
            preserveRatio: true,
 
51
            handles: 'all',
 
52
            draggable:true,
 
53
            dynamic:true
 
54
        });
 
55
        var customEl = custom.getEl();
 
56
        // move to the body to prevent overlap on my blog
 
57
        document.body.insertBefore(customEl.dom, document.body.firstChild);
 
58
        
 
59
        customEl.on('dblclick', function(){
 
60
            customEl.hide(true);
 
61
        });
 
62
        customEl.hide();
 
63
        
 
64
        Ext.get('showMe').on('click', function(){
 
65
            customEl.center();
 
66
            customEl.show(true);
 
67
        });
 
68
        
 
69
        var dwrapped = new Ext.Resizable('dwrapped', {
 
70
            wrap:true,
 
71
            pinned:true,
 
72
            width:450,
 
73
            height:150,
 
74
            minWidth:200,
 
75
            minHeight: 50,
 
76
            dynamic: true
 
77
        });
 
78
        
 
79
        var snap = new Ext.Resizable('snap', {
 
80
            pinned:true,
 
81
            width:250,
 
82
            height:100,
 
83
            handles: 'e',
 
84
            widthIncrement:50,
 
85
            minWidth: 50,
 
86
            dynamic: true
 
87
        });
 
88
    }
 
89
};
 
90
 
 
91
Ext.EventManager.onDocumentReady(ResizableExample.init, ResizableExample, true);</pre>    
 
92
</body>
 
93
</html>
 
 
b'\\ No newline at end of file'