|
641 | 641 | } |
642 | 642 | self.grid.move_node(node, x, y, width, height); |
643 | 643 | self._update_container_height(); |
644 | | - event.stopPropagation(); |
645 | 644 | }; |
646 | 645 |
|
647 | 646 | var on_start_moving = function(event, ui) { |
|
661 | 660 |
|
662 | 661 | el.resizable('option', 'minWidth', cell_width * (node.min_width || 1)); |
663 | 662 | el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1)); |
664 | | - event.stopPropagation(); |
665 | 663 | }; |
666 | 664 |
|
667 | 665 | var on_end_moving = function(event, ui) { |
|
679 | 677 | self._trigger_change_event(); |
680 | 678 |
|
681 | 679 | self.grid.end_update(); |
682 | | - event.stopPropagation(); |
683 | 680 | }; |
684 | 681 |
|
685 | 682 | el |
|
970 | 967 |
|
971 | 968 | scope.GridStackUI.Utils = Utils; |
972 | 969 |
|
| 970 | + function event_stop_propagate(event) { |
| 971 | + event.stopPropagation(); |
| 972 | + } |
973 | 973 | $.fn.gridstack = function(opts) { |
974 | 974 | return this.each(function() { |
975 | | - if (!$(this).data('gridstack')) { |
976 | | - $(this).data('gridstack', new GridStack(this, opts)); |
| 975 | + var o = $(this); |
| 976 | + if (!o.data('gridstack')) { |
| 977 | + o |
| 978 | + .data('gridstack', new GridStack(this, opts)) |
| 979 | + .on('dragstart', event_stop_propagate) |
| 980 | + .on('dragstop', event_stop_propagate) |
| 981 | + .on('drag', event_stop_propagate) |
| 982 | + .on('resizestart', event_stop_propagate) |
| 983 | + .on('resizestop', event_stop_propagate) |
| 984 | + .on('resize', event_stop_propagate); |
977 | 985 | } |
978 | 986 | }); |
979 | 987 | }; |
|
0 commit comments