| 686 | | var o = ui.options, self = ui.instance; |
| 687 | | |
| 688 | | $(o.alsoResize).each(function() { |
| 689 | | $(this).data("resizable-alsoresize-start", { |
| 690 | | width: parseInt($(this).css('width'), 10), height: parseInt($(this).css('height'), 10), |
| 691 | | left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10) |
| | 686 | var o = ui.options, self = ui.instance, |
| | 687 | |
| | 688 | _store = function(exp) { |
| | 689 | $(exp).each(function() { |
| | 690 | $(this).data("resizable-alsoresize-start", { |
| | 691 | width: parseInt($(this).css('width'), 10), height: parseInt($(this).css('height'), 10), |
| | 692 | left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10) |
| | 693 | }); |
| 697 | | var o = ui.options, self = ui.instance; |
| 698 | | |
| 699 | | var delta = { |
| 700 | | height: (self.size.height - self.originalSize.height) || 0, |
| 701 | | width: (self.size.width - self.originalSize.width) || 0, |
| 702 | | top: (self.position.top - self.originalPosition.top) || 0, |
| 703 | | left: (self.position.left - self.originalPosition.left) || 0 |
| | 705 | var o = ui.options, self = ui.instance, os = self.originalSize, op = self.originalPosition; |
| | 706 | |
| | 707 | var delta = { |
| | 708 | height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0, |
| | 709 | top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0 |
| | 710 | }, |
| | 711 | |
| | 712 | _alsoResize = function(exp, c) { |
| | 713 | $(exp).each(function() { |
| | 714 | var start = $(this).data("resizable-alsoresize-start"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; |
| | 715 | |
| | 716 | $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) { |
| | 717 | style[prop] = (start[prop] + delta[prop]) || null |
| | 718 | }); |
| | 719 | |
| | 720 | $(this).css(style); |
| | 721 | }); |
| 706 | | $(o.alsoResize, self.element).each(function() { |
| 707 | | var start = $(this).data("resizable-alsoresize-start"), style = {}; |
| 708 | | |
| 709 | | $.each(o.alsoResizeCss || ['width', 'height', 'top', 'left'], function(i, prop) { |
| 710 | | style[prop] = (start[prop] + delta[prop]) || null |
| 711 | | }); |
| 712 | | |
| 713 | | $(this).css(style); |
| 714 | | }); |
| | 724 | if (typeof(o.alsoResize) == 'object') { |
| | 725 | $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); }); |
| | 726 | }else{ |
| | 727 | _alsoResize(o.alsoResize); |
| | 728 | } |