Skip to content

Commit

Permalink
resizable: removed ui.options
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Bakaus committed Jan 29, 2009
1 parent 3d16d2e commit c88df4d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions ui/ui.resizable.js
Expand Up @@ -492,7 +492,6 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
helper: this.helper, helper: this.helper,
position: this.position, position: this.position,
size: this.size, size: this.size,
options: this.options,
originalSize: this.originalSize, originalSize: this.originalSize,
originalPosition: this.originalPosition originalPosition: this.originalPosition
}; };
Expand Down Expand Up @@ -538,7 +537,7 @@ $.ui.plugin.add("resizable", "alsoResize", {


start: function(event, ui) { start: function(event, ui) {


var o = ui.options, self = $(this).data("resizable"), var self = $(this).data("resizable"), o = self.options;


_store = function(exp) { _store = function(exp) {
$(exp).each(function() { $(exp).each(function() {
Expand All @@ -558,7 +557,7 @@ $.ui.plugin.add("resizable", "alsoResize", {
}, },


resize: function(event, ui){ resize: function(event, ui){
var o = ui.options, self = $(this).data("resizable"), os = self.originalSize, op = self.originalPosition; var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;


var delta = { var delta = {
height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0, height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
Expand Down Expand Up @@ -608,7 +607,7 @@ $.ui.plugin.add("resizable", "alsoResize", {
$.ui.plugin.add("resizable", "animate", { $.ui.plugin.add("resizable", "animate", {


stop: function(event, ui) { stop: function(event, ui) {
var o = ui.options, self = $(this).data("resizable"); var self = $(this).data("resizable"), o = self.options;


var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName), var pr = o.proportionallyResize, ista = pr && (/textarea/i).test(pr.get(0).nodeName),
soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height, soffseth = ista && $.ui.hasScroll(pr.get(0), 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
Expand Down Expand Up @@ -647,7 +646,7 @@ $.ui.plugin.add("resizable", "animate", {
$.ui.plugin.add("resizable", "containment", { $.ui.plugin.add("resizable", "containment", {


start: function(event, ui) { start: function(event, ui) {
var o = ui.options, self = $(this).data("resizable"), el = self.element; var self = $(this).data("resizable"), o = self.options, el = self.element;
var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
if (!ce) return; if (!ce) return;


Expand Down Expand Up @@ -682,7 +681,7 @@ $.ui.plugin.add("resizable", "containment", {
}, },


resize: function(event, ui) { resize: function(event, ui) {
var o = ui.options, self = $(this).data("resizable"), var self = $(this).data("resizable"), o = self.options,
ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position, ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
pRatio = o._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement; pRatio = o._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;


Expand Down Expand Up @@ -715,7 +714,7 @@ $.ui.plugin.add("resizable", "containment", {
}, },


stop: function(event, ui){ stop: function(event, ui){
var o = ui.options, self = $(this).data("resizable"), cp = self.position, var self = $(this).data("resizable"), o = self.options, cp = self.position,
co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement; co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;


var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height; var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
Expand All @@ -733,7 +732,7 @@ $.ui.plugin.add("resizable", "ghost", {


start: function(event, ui) { start: function(event, ui) {


var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size; var self = $(this).data("resizable"), o = self.options, pr = o.proportionallyResize, cs = self.size;


self.ghost = self.originalElement.clone(); self.ghost = self.originalElement.clone();
self.ghost self.ghost
Expand All @@ -746,12 +745,12 @@ $.ui.plugin.add("resizable", "ghost", {
}, },


resize: function(event, ui){ resize: function(event, ui){
var o = ui.options, self = $(this).data("resizable"); var self = $(this).data("resizable"), o = self.options;
if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width }); if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
}, },


stop: function(event, ui){ stop: function(event, ui){
var o = ui.options, self = $(this).data("resizable"); var self = $(this).data("resizable"), o = self.options;
if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0)); if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
} }


Expand All @@ -760,7 +759,7 @@ $.ui.plugin.add("resizable", "ghost", {
$.ui.plugin.add("resizable", "grid", { $.ui.plugin.add("resizable", "grid", {


resize: function(event, ui) { resize: function(event, ui) {
var o = ui.options, self = $(this).data("resizable"), cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey; var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid; o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1); var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);


Expand Down

0 comments on commit c88df4d

Please sign in to comment.