53c69ec8dee6858432ac4b86b2296955f8c17d6b.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. /**
  7. * @class Ext.Resizable
  8. * @extends Ext.util.Observable
  9. * <p>
  10. * Applies drag handles to an element to make it resizable. The drag
  11. * handles are inserted into the element and positioned absolute. Some
  12. * elements, such as a textarea or image, don't support this. To
  13. * overcome that, you can wrap the textarea in a div and set
  14. * "resizeChild" to true (or to the id of the element), <b>or</b> set
  15. * wrap:true in your config and the element will be wrapped for you
  16. * automatically.
  17. * </p>
  18. * <p>
  19. * Here is the list of valid resize handles:
  20. * </p>
  21. *
  22. * <pre>
  23. * Value
  24. * Description
  25. * ------ -------------------
  26. * 'n' north
  27. * 's' south
  28. * 'e' east
  29. * 'w' west
  30. * 'nw' northwest
  31. * 'sw' southwest
  32. * 'se' southeast
  33. * 'ne' northeast
  34. * 'all' all
  35. * </pre>
  36. *
  37. * <p>
  38. * Here's an example showing the creation of a typical Resizable:
  39. * </p>
  40. *
  41. * <pre><code>
  42. * var resizer = new Ext.Resizable(&quot;element-id&quot;, {
  43. * handles : 'all',
  44. * minWidth : 200,
  45. * minHeight : 100,
  46. * maxWidth : 500,
  47. * maxHeight : 400,
  48. * pinned : true
  49. * });
  50. * resizer.on(&quot;resize&quot;, myHandler);
  51. * </code></pre>
  52. *
  53. * <p>
  54. * To hide a particular handle, set its display to none in CSS, or
  55. * through script:<br>
  56. * resizer.east.setDisplayed(false);
  57. * </p>
  58. * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or
  59. * id/element to resize (defaults to false)
  60. * @cfg {Array/String} adjustments String "auto" or an array [width, height]
  61. * with values to be <b>added</b> to the resize operation's new size
  62. * (defaults to [0, 0])
  63. * @cfg {Number} minWidth The minimum width for the element (defaults to 5)
  64. * @cfg {Number} minHeight The minimum height for the element (defaults to 5)
  65. * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000)
  66. * @cfg {Number} maxHeight The maximum height for the element (defaults to
  67. * 10000)
  68. * @cfg {Boolean} enabled False to disable resizing (defaults to true)
  69. * @cfg {Boolean} wrap True to wrap an element with a div if needed (required
  70. * for textareas and images, defaults to false)
  71. * @cfg {Number} width The width of the element in pixels (defaults to null)
  72. * @cfg {Number} height The height of the element in pixels (defaults to null)
  73. * @cfg {Boolean} animate True to animate the resize (not compatible with
  74. * dynamic sizing, defaults to false)
  75. * @cfg {Number} duration Animation duration if animate = true (defaults to .35)
  76. * @cfg {Boolean} dynamic True to resize the element while dragging instead of
  77. * using a proxy (defaults to false)
  78. * @cfg {String} handles String consisting of the resize handles to display
  79. * (defaults to undefined)
  80. * @cfg {Boolean} multiDirectional <b>Deprecated</b>. The old style of adding
  81. * multi-direction resize handles, deprecated in favor of the handles
  82. * config option (defaults to false)
  83. * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only
  84. * applied at config time. (defaults to false)
  85. * @cfg {String} easing Animation easing if animate = true (defaults to
  86. * 'easingOutStrong')
  87. * @cfg {Number} widthIncrement The increment to snap the width resize in pixels
  88. * (dynamic must be true, defaults to 0)
  89. * @cfg {Number} heightIncrement The increment to snap the height resize in
  90. * pixels (dynamic must be true, defaults to 0)
  91. * @cfg {Boolean} pinned True to ensure that the resize handles are always
  92. * visible, false to display them only when the user mouses over the
  93. * resizable borders. This is only applied at config time. (defaults to
  94. * false)
  95. * @cfg {Boolean} preserveRatio True to preserve the original ratio between
  96. * height and width during resize (defaults to false)
  97. * @cfg {Boolean} transparent True for transparent handles. This is only applied
  98. * at config time. (defaults to false)
  99. * @cfg {Number} minX The minimum allowed page X for the element (only used for
  100. * west resizing, defaults to 0)
  101. * @cfg {Number} minY The minimum allowed page Y for the element (only used for
  102. * north resizing, defaults to 0)
  103. * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to
  104. * false)
  105. * @constructor Create a new resizable component
  106. * @param {Mixed}
  107. * el The id or element to resize
  108. * @param {Object}
  109. * config configuration options
  110. */
  111. Ext.Resizable = function(el, config) {
  112. this.el = Ext.get(el);
  113. if (config && config.wrap) {
  114. config.resizeChild = this.el;
  115. this.el = this.el.wrap(typeof config.wrap == "object" ? config.wrap : {
  116. cls : "xresizable-wrap"
  117. });
  118. this.el.id = this.el.dom.id = config.resizeChild.id + "-rzwrap";
  119. this.el.setStyle("overflow", "hidden");
  120. this.el.setPositioning(config.resizeChild.getPositioning());
  121. config.resizeChild.clearPositioning();
  122. if (!config.width || !config.height) {
  123. var csize = config.resizeChild.getSize();
  124. this.el.setSize(csize.width, csize.height);
  125. }
  126. if (config.pinned && !config.adjustments) {
  127. config.adjustments = "auto";
  128. }
  129. }
  130. this.proxy = this.el.createProxy({
  131. tag : "div",
  132. cls : "x-resizable-proxy",
  133. id : this.el.id + "-rzproxy"
  134. });
  135. this.proxy.unselectable();
  136. this.proxy.enableDisplayMode('block');
  137. Ext.apply(this, config);
  138. if (this.pinned) {
  139. this.disableTrackOver = true;
  140. this.el.addClass("x-resizable-pinned");
  141. }
  142. // if the element isn't positioned, make it relative
  143. var position = this.el.getStyle("position");
  144. if (position != "absolute" && position != "fixed") {
  145. this.el.setStyle("position", "relative");
  146. }
  147. if (!this.handles) { // no handles passed, must be legacy style
  148. this.handles = 's,e,se';
  149. if (this.multiDirectional) {
  150. this.handles += ',n,w';
  151. }
  152. }
  153. if (this.handles == "all") {
  154. this.handles = "n s e w ne nw se sw";
  155. }
  156. var hs = this.handles.split(/\s*?[,;]\s*?| /);
  157. var ps = Ext.Resizable.positions;
  158. for (var i = 0, len = hs.length; i < len; i++) {
  159. if (hs[i] && ps[hs[i]]) {
  160. var pos = ps[hs[i]];
  161. this[pos] = new Ext.Resizable.Handle(this, pos,
  162. this.disableTrackOver, this.transparent);
  163. }
  164. }
  165. // legacy
  166. this.corner = this.southeast;
  167. if (this.handles.indexOf("n") != -1 || this.handles.indexOf("w") != -1) {
  168. this.updateBox = true;
  169. }
  170. this.activeHandle = null;
  171. if (this.resizeChild) {
  172. if (typeof this.resizeChild == "boolean") {
  173. this.resizeChild = Ext.get(this.el.dom.firstChild, true);
  174. } else {
  175. this.resizeChild = Ext.get(this.resizeChild, true);
  176. }
  177. }
  178. if (this.adjustments == "auto") {
  179. var rc = this.resizeChild;
  180. var hw = this.west, he = this.east, hn = this.north, hs = this.south;
  181. if (rc && (hw || hn)) {
  182. rc.position("relative");
  183. rc.setLeft(hw ? hw.el.getWidth() : 0);
  184. rc.setTop(hn ? hn.el.getHeight() : 0);
  185. }
  186. this.adjustments = [
  187. (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0),
  188. (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0)
  189. - 1];
  190. }
  191. if (this.draggable) {
  192. this.dd = this.dynamic ? this.el.initDD(null) : this.el.initDDProxy(
  193. null, {
  194. dragElId : this.proxy.id
  195. });
  196. this.dd.setHandleElId(this.resizeChild
  197. ? this.resizeChild.id
  198. : this.el.id);
  199. }
  200. // public events
  201. this.addEvents("beforeresize", "resize");
  202. if (this.width !== null && this.height !== null) {
  203. this.resizeTo(this.width, this.height);
  204. } else {
  205. this.updateChildSize();
  206. }
  207. if (Ext.isIE) {
  208. this.el.dom.style.zoom = 1;
  209. }
  210. Ext.Resizable.superclass.constructor.call(this);
  211. };
  212. Ext.extend(Ext.Resizable, Ext.util.Observable, {
  213. resizeChild : false,
  214. adjustments : [0, 0],
  215. minWidth : 5,
  216. minHeight : 5,
  217. maxWidth : 10000,
  218. maxHeight : 10000,
  219. enabled : true,
  220. animate : false,
  221. duration : .35,
  222. dynamic : false,
  223. handles : false,
  224. multiDirectional : false,
  225. disableTrackOver : false,
  226. easing : 'easeOutStrong',
  227. widthIncrement : 0,
  228. heightIncrement : 0,
  229. pinned : false,
  230. width : null,
  231. height : null,
  232. preserveRatio : false,
  233. transparent : false,
  234. minX : 0,
  235. minY : 0,
  236. draggable : false,
  237. /**
  238. * @cfg {Mixed} constrainTo Constrain the resize to a particular
  239. * element
  240. */
  241. /**
  242. * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a
  243. * particular region
  244. */
  245. /**
  246. * @event beforeresize Fired before resize is allowed. Set enabled
  247. * to false to cancel resize.
  248. * @param {Ext.Resizable}
  249. * this
  250. * @param {Ext.EventObject}
  251. * e The mousedown event
  252. */
  253. /**
  254. * @event resize Fired after a resize.
  255. * @param {Ext.Resizable}
  256. * this
  257. * @param {Number}
  258. * width The new width
  259. * @param {Number}
  260. * height The new height
  261. * @param {Ext.EventObject}
  262. * e The mouseup event
  263. */
  264. /**
  265. * Perform a manual resize
  266. *
  267. * @param {Number}
  268. * width
  269. * @param {Number}
  270. * height
  271. */
  272. resizeTo : function(width, height) {
  273. this.el.setSize(width, height);
  274. this.updateChildSize();
  275. this.fireEvent("resize", this, width, height, null);
  276. },
  277. // private
  278. startSizing : function(e, handle) {
  279. this.fireEvent("beforeresize", this, e);
  280. if (this.enabled) { // 2nd enabled check in case disabled before
  281. // beforeresize handler
  282. if (!this.overlay) {
  283. this.overlay = this.el.createProxy({
  284. tag : "div",
  285. cls : "x-resizable-overlay",
  286. html : "&#160;"
  287. }, Ext.getBody());
  288. this.overlay.unselectable();
  289. this.overlay.enableDisplayMode("block");
  290. this.overlay.on("mousemove", this.onMouseMove, this);
  291. this.overlay.on("mouseup", this.onMouseUp, this);
  292. }
  293. this.overlay.setStyle("cursor", handle.el
  294. .getStyle("cursor"));
  295. this.resizing = true;
  296. this.startBox = this.el.getBox();
  297. this.startPoint = e.getXY();
  298. this.offsets = [
  299. (this.startBox.x + this.startBox.width)
  300. - this.startPoint[0],
  301. (this.startBox.y + this.startBox.height)
  302. - this.startPoint[1]];
  303. this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),
  304. Ext.lib.Dom.getViewHeight(true));
  305. this.overlay.show();
  306. if (this.constrainTo) {
  307. var ct = Ext.get(this.constrainTo);
  308. this.resizeRegion = ct.getRegion().adjust(
  309. ct.getFrameWidth('t'), ct.getFrameWidth('l'),
  310. -ct.getFrameWidth('b'), -ct.getFrameWidth('r'));
  311. }
  312. this.proxy.setStyle('visibility', 'hidden'); // workaround
  313. // display
  314. // none
  315. this.proxy.show();
  316. this.proxy.setBox(this.startBox);
  317. if (!this.dynamic) {
  318. this.proxy.setStyle('visibility', 'visible');
  319. }
  320. }
  321. },
  322. // private
  323. onMouseDown : function(handle, e) {
  324. if (this.enabled) {
  325. e.stopEvent();
  326. this.activeHandle = handle;
  327. this.startSizing(e, handle);
  328. }
  329. },
  330. // private
  331. onMouseUp : function(e) {
  332. var size = this.resizeElement();
  333. this.resizing = false;
  334. this.handleOut();
  335. this.overlay.hide();
  336. this.proxy.hide();
  337. this.fireEvent("resize", this, size.width, size.height, e);
  338. },
  339. // private
  340. updateChildSize : function() {
  341. if (this.resizeChild) {
  342. var el = this.el;
  343. var child = this.resizeChild;
  344. var adj = this.adjustments;
  345. if (el.dom.offsetWidth) {
  346. var b = el.getSize(true);
  347. child.setSize(b.width + adj[0], b.height + adj[1]);
  348. }
  349. // Second call here for IE
  350. // The first call enables instant resizing and
  351. // the second call corrects scroll bars if they
  352. // exist
  353. if (Ext.isIE) {
  354. setTimeout(function() {
  355. if (el.dom.offsetWidth) {
  356. var b = el.getSize(true);
  357. child.setSize(b.width + adj[0],
  358. b.height + adj[1]);
  359. }
  360. }, 10);
  361. }
  362. }
  363. },
  364. // private
  365. snap : function(value, inc, min) {
  366. if (!inc || !value)
  367. return value;
  368. var newValue = value;
  369. var m = value % inc;
  370. if (m > 0) {
  371. if (m > (inc / 2)) {
  372. newValue = value + (inc - m);
  373. } else {
  374. newValue = value - m;
  375. }
  376. }
  377. return Math.max(min, newValue);
  378. },
  379. // private
  380. resizeElement : function() {
  381. var box = this.proxy.getBox();
  382. if (this.updateBox) {
  383. this.el.setBox(box, false, this.animate, this.duration,
  384. null, this.easing);
  385. } else {
  386. this.el.setSize(box.width, box.height, this.animate,
  387. this.duration, null, this.easing);
  388. }
  389. this.updateChildSize();
  390. if (!this.dynamic) {
  391. this.proxy.hide();
  392. }
  393. return box;
  394. },
  395. // private
  396. constrain : function(v, diff, m, mx) {
  397. if (v - diff < m) {
  398. diff = v - m;
  399. } else if (v - diff > mx) {
  400. diff = mx - v;
  401. }
  402. return diff;
  403. },
  404. // private
  405. onMouseMove : function(e) {
  406. if (this.enabled) {
  407. try {// try catch so if something goes wrong the user
  408. // doesn't get hung
  409. if (this.resizeRegion
  410. && !this.resizeRegion.contains(e.getPoint())) {
  411. return;
  412. }
  413. // var curXY = this.startPoint;
  414. var curSize = this.curSize || this.startBox;
  415. var x = this.startBox.x, y = this.startBox.y;
  416. var ox = x, oy = y;
  417. var w = curSize.width, h = curSize.height;
  418. var ow = w, oh = h;
  419. var mw = this.minWidth, mh = this.minHeight;
  420. var mxw = this.maxWidth, mxh = this.maxHeight;
  421. var wi = this.widthIncrement;
  422. var hi = this.heightIncrement;
  423. var eventXY = e.getXY();
  424. var diffX = -(this.startPoint[0] - Math.max(this.minX,
  425. eventXY[0]));
  426. var diffY = -(this.startPoint[1] - Math.max(this.minY,
  427. eventXY[1]));
  428. var pos = this.activeHandle.position;
  429. switch (pos) {
  430. case "east" :
  431. w += diffX;
  432. w = Math.min(Math.max(mw, w), mxw);
  433. break;
  434. case "south" :
  435. h += diffY;
  436. h = Math.min(Math.max(mh, h), mxh);
  437. break;
  438. case "southeast" :
  439. w += diffX;
  440. h += diffY;
  441. w = Math.min(Math.max(mw, w), mxw);
  442. h = Math.min(Math.max(mh, h), mxh);
  443. break;
  444. case "north" :
  445. diffY = this.constrain(h, diffY, mh, mxh);
  446. y += diffY;
  447. h -= diffY;
  448. break;
  449. case "west" :
  450. diffX = this.constrain(w, diffX, mw, mxw);
  451. x += diffX;
  452. w -= diffX;
  453. break;
  454. case "northeast" :
  455. w += diffX;
  456. w = Math.min(Math.max(mw, w), mxw);
  457. diffY = this.constrain(h, diffY, mh, mxh);
  458. y += diffY;
  459. h -= diffY;
  460. break;
  461. case "northwest" :
  462. diffX = this.constrain(w, diffX, mw, mxw);
  463. diffY = this.constrain(h, diffY, mh, mxh);
  464. y += diffY;
  465. h -= diffY;
  466. x += diffX;
  467. w -= diffX;
  468. break;
  469. case "southwest" :
  470. diffX = this.constrain(w, diffX, mw, mxw);
  471. h += diffY;
  472. h = Math.min(Math.max(mh, h), mxh);
  473. x += diffX;
  474. w -= diffX;
  475. break;
  476. }
  477. var sw = this.snap(w, wi, mw);
  478. var sh = this.snap(h, hi, mh);
  479. if (sw != w || sh != h) {
  480. switch (pos) {
  481. case "northeast" :
  482. y -= sh - h;
  483. break;
  484. case "north" :
  485. y -= sh - h;
  486. break;
  487. case "southwest" :
  488. x -= sw - w;
  489. break;
  490. case "west" :
  491. x -= sw - w;
  492. break;
  493. case "northwest" :
  494. x -= sw - w;
  495. y -= sh - h;
  496. break;
  497. }
  498. w = sw;
  499. h = sh;
  500. }
  501. if (this.preserveRatio) {
  502. switch (pos) {
  503. case "southeast" :
  504. case "east" :
  505. h = oh * (w / ow);
  506. h = Math.min(Math.max(mh, h), mxh);
  507. w = ow * (h / oh);
  508. break;
  509. case "south" :
  510. w = ow * (h / oh);
  511. w = Math.min(Math.max(mw, w), mxw);
  512. h = oh * (w / ow);
  513. break;
  514. case "northeast" :
  515. w = ow * (h / oh);
  516. w = Math.min(Math.max(mw, w), mxw);
  517. h = oh * (w / ow);
  518. break;
  519. case "north" :
  520. var tw = w;
  521. w = ow * (h / oh);
  522. w = Math.min(Math.max(mw, w), mxw);
  523. h = oh * (w / ow);
  524. x += (tw - w) / 2;
  525. break;
  526. case "southwest" :
  527. h = oh * (w / ow);
  528. h = Math.min(Math.max(mh, h), mxh);
  529. var tw = w;
  530. w = ow * (h / oh);
  531. x += tw - w;
  532. break;
  533. case "west" :
  534. var th = h;
  535. h = oh * (w / ow);
  536. h = Math.min(Math.max(mh, h), mxh);
  537. y += (th - h) / 2;
  538. var tw = w;
  539. w = ow * (h / oh);
  540. x += tw - w;
  541. break;
  542. case "northwest" :
  543. var tw = w;
  544. var th = h;
  545. h = oh * (w / ow);
  546. h = Math.min(Math.max(mh, h), mxh);
  547. w = ow * (h / oh);
  548. y += th - h;
  549. x += tw - w;
  550. break;
  551. }
  552. }
  553. this.proxy.setBounds(x, y, w, h);
  554. if (this.dynamic) {
  555. this.resizeElement();
  556. }
  557. } catch (e) {
  558. }
  559. }
  560. },
  561. // private
  562. handleOver : function() {
  563. if (this.enabled) {
  564. this.el.addClass("x-resizable-over");
  565. }
  566. },
  567. // private
  568. handleOut : function() {
  569. if (!this.resizing) {
  570. this.el.removeClass("x-resizable-over");
  571. }
  572. },
  573. /**
  574. * Returns the element this component is bound to.
  575. *
  576. * @return {Ext.Element}
  577. */
  578. getEl : function() {
  579. return this.el;
  580. },
  581. /**
  582. * Returns the resizeChild element (or null).
  583. *
  584. * @return {Ext.Element}
  585. */
  586. getResizeChild : function() {
  587. return this.resizeChild;
  588. },
  589. /**
  590. * Destroys this resizable. If the element was wrapped and removeEl
  591. * is not true then the element remains.
  592. *
  593. * @param {Boolean}
  594. * removeEl (optional) true to remove the element from
  595. * the DOM
  596. */
  597. destroy : function(removeEl) {
  598. this.proxy.remove();
  599. if (this.overlay) {
  600. this.overlay.removeAllListeners();
  601. this.overlay.remove();
  602. }
  603. var ps = Ext.Resizable.positions;
  604. for (var k in ps) {
  605. if (typeof ps[k] != "function" && this[ps[k]]) {
  606. var h = this[ps[k]];
  607. h.el.removeAllListeners();
  608. h.el.remove();
  609. }
  610. }
  611. if (removeEl) {
  612. this.el.update("");
  613. this.el.remove();
  614. }
  615. },
  616. syncHandleHeight : function() {
  617. var h = this.el.getHeight(true);
  618. if (this.west) {
  619. this.west.el.setHeight(h);
  620. }
  621. if (this.east) {
  622. this.east.el.setHeight(h);
  623. }
  624. }
  625. });
  626. // private
  627. // hash to map config positions to true positions
  628. Ext.Resizable.positions = {
  629. n : "north",
  630. s : "south",
  631. e : "east",
  632. w : "west",
  633. se : "southeast",
  634. sw : "southwest",
  635. nw : "northwest",
  636. ne : "northeast"
  637. };
  638. // private
  639. Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent) {
  640. if (!this.tpl) {
  641. // only initialize the template if resizable is used
  642. var tpl = Ext.DomHelper.createTemplate({
  643. tag : "div",
  644. cls : "x-resizable-handle x-resizable-handle-{0}"
  645. });
  646. tpl.compile();
  647. Ext.Resizable.Handle.prototype.tpl = tpl;
  648. }
  649. this.position = pos;
  650. this.rz = rz;
  651. this.el = this.tpl.append(rz.el.dom, [this.position], true);
  652. this.el.unselectable();
  653. if (transparent) {
  654. this.el.setOpacity(0);
  655. }
  656. this.el.on("mousedown", this.onMouseDown, this);
  657. if (!disableTrackOver) {
  658. this.el.on("mouseover", this.onMouseOver, this);
  659. this.el.on("mouseout", this.onMouseOut, this);
  660. }
  661. };
  662. // private
  663. Ext.Resizable.Handle.prototype = {
  664. afterResize : function(rz) {
  665. // do nothing
  666. },
  667. // private
  668. onMouseDown : function(e) {
  669. this.rz.onMouseDown(this, e);
  670. },
  671. // private
  672. onMouseOver : function(e) {
  673. this.rz.handleOver(this, e);
  674. },
  675. // private
  676. onMouseOut : function(e) {
  677. this.rz.handleOut(this, e);
  678. }
  679. };