|
43 | 43 | collision: {},
|
44 | 44 | draggable: {
|
45 | 45 | items: '.gs-w',
|
46 |
| - distance: 4 |
| 46 | + distance: 4, |
| 47 | + ignore_dragging: Draggable.defaults.ignore_dragging.slice(0) |
47 | 48 | },
|
48 | 49 | resize: {
|
49 | 50 | enabled: false,
|
|
102 | 103 | * @param {Object} [options.draggable] An Object with all options for
|
103 | 104 | * Draggable class you want to overwrite. See Draggable docs for more
|
104 | 105 | * info.
|
105 |
| - * @param {Object} [options.resize] An Object with resize config |
106 |
| - * options. |
| 106 | + * @param {Object|Function} [options.draggable.ignore_dragging] Note that |
| 107 | + * if you use a Function, and resize is enabled, you should ignore the |
| 108 | + * resize handlers manually (options.resize.handle_class). |
| 109 | + * @param {Object} [options.resize] An Object with resize config options. |
107 | 110 | * @param {Boolean} [options.resize.enabled] Set to true to enable
|
108 | 111 | * resizing.
|
109 | 112 | * @param {Array} [options.resize.axes] Axes in which widgets can be
|
|
943 | 946 | offset_top: this.options.widget_margins[1],
|
944 | 947 | container_width: this.cols * this.min_widget_width,
|
945 | 948 | limit: true,
|
946 |
| - ignore_dragging: ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', |
947 |
| - '.' + this.options.resize.handle_class], |
948 | 949 | start: function(event, ui) {
|
949 | 950 | self.$widgets.filter('.player-revert')
|
950 | 951 | .removeClass('player-revert');
|
|
1014 | 1015 | this.resize_handle_tpl = $.map(axes, function(type) {
|
1015 | 1016 | return handle_tpl.replace('{type}', type);
|
1016 | 1017 | }).join('');
|
| 1018 | + |
| 1019 | + if ($.isArray(this.options.draggable.ignore_dragging)) { |
| 1020 | + this.options.draggable.ignore_dragging.push( |
| 1021 | + '.' + this.resize_handle_class); |
| 1022 | + } |
| 1023 | + |
1017 | 1024 | return this;
|
1018 | 1025 | };
|
1019 | 1026 |
|
|
0 commit comments