You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.9 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. var ResizableExample = {
  16. init : function(){
  17. var basic = new Ext.Resizable('basic', {
  18. width: 200,
  19. height: 100,
  20. minWidth:100,
  21. minHeight:50
  22. });
  23. var animated = new Ext.Resizable('animated', {
  24. width: 200,
  25. pinned: true,
  26. height: 100,
  27. minWidth:100,
  28. minHeight:50,
  29. animate:true,
  30. easing: 'backIn',
  31. duration:.6
  32. });
  33. var wrapped = new Ext.Resizable('wrapped', {
  34. wrap:true,
  35. pinned:true,
  36. minWidth:50,
  37. minHeight: 50,
  38. preserveRatio: true
  39. });
  40. var transparent = new Ext.Resizable('transparent', {
  41. wrap:true,
  42. minWidth:50,
  43. minHeight: 50,
  44. preserveRatio: true,
  45. transparent:true
  46. });
  47. var custom = new Ext.Resizable('custom', {
  48. wrap:true,
  49. pinned:true,
  50. minWidth:50,
  51. minHeight: 50,
  52. preserveRatio: true,
  53. handles: 'all',
  54. draggable:true,
  55. dynamic:true
  56. });
  57. var customEl = custom.getEl();
  58. // move to the body to prevent overlap on my blog
  59. document.body.insertBefore(customEl.dom, document.body.firstChild);
  60. customEl.on('dblclick', function(){
  61. customEl.hide(true);
  62. });
  63. customEl.hide();
  64. Ext.get('showMe').on('click', function(){
  65. customEl.center();
  66. customEl.show(true);
  67. });
  68. var dwrapped = new Ext.Resizable('dwrapped', {
  69. wrap:true,
  70. pinned:true,
  71. width:450,
  72. height:150,
  73. minWidth:200,
  74. minHeight: 50,
  75. dynamic: true
  76. });
  77. var snap = new Ext.Resizable('snap', {
  78. pinned:true,
  79. width:250,
  80. height:100,
  81. handles: 'e',
  82. widthIncrement:50,
  83. minWidth: 50,
  84. dynamic: true
  85. });
  86. }
  87. };
  88. Ext.EventManager.onDocumentReady(ResizableExample.init, ResizableExample, true);