4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
12 * Renders a resize handle that fires ResizeStart, Resize and ResizeEnd events.
14 * @-x-less ResizeHandle.less
15 * @class tinymce.ui.ResizeHandle
16 * @extends tinymce.ui.Widget
18 define("tinymce/ui/ResizeHandle", [
20 "tinymce/ui/DragHelper"
21 ], function(Widget, DragHelper) {
24 return Widget.extend({
26 * Renders the control as a HTML string.
29 * @return {String} HTML representing the control.
31 renderHtml: function() {
32 var self = this, prefix = self.classPrefix;
34 self.addClass('resizehandle');
36 if (self.settings.direction == "both") {
37 self.addClass('resizehandle-both');
40 self.canFocus = false;
43 '<div id="' + self._id + '" class="' + self.classes() + '">' +
44 '<i class="' + prefix + 'ico ' + prefix + 'i-resize"></i>' +
50 * Called after the control has been rendered.
54 postRender: function() {
59 self.resizeDragHelper = new DragHelper(this._id, {
61 self.fire('ResizeStart');
65 if (self.settings.direction != "both") {
69 self.fire('Resize', e);
73 self.fire('ResizeEnd');