diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-03 14:23:13 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-11-03 14:23:13 +0000 |
commit | 04688e3eee7e68f056a38c3bbfc3870ac49bf772 (patch) | |
tree | ff140f78d3c92b55ed11e484f659aacc5b1c449f /ui/ui.resizable.js | |
parent | 0e16fcf1e865a6ea553265e202ed54b6935c54f4 (diff) | |
download | jquery-ui-04688e3eee7e68f056a38c3bbfc3870ac49bf772.tar.gz jquery-ui-04688e3eee7e68f056a38c3bbfc3870ac49bf772.zip |
core: restructured helper functions, made enableSelection/disableSelection jQuery plugins (fixes 3459)
Diffstat (limited to 'ui/ui.resizable.js')
-rw-r--r-- | ui/ui.resizable.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js index d480296a7..3e25bf25a 100644 --- a/ui/ui.resizable.js +++ b/ui/ui.resizable.js @@ -185,7 +185,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, { o._handles = $('.ui-resizable-handle', self.element); if (o.disableSelection) - o._handles.each(function(i, e) { $.ui.disableSelection(e); }); + o._handles.disableSelection(); //Matching axis name o._handles.mouseover(function() { @@ -290,7 +290,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, { } //Opera fixing relative position - if ($.browser.opera && /relative/.test(el.css('position'))) + if ($.browser.opera && (/relative/).test(el.css('position'))) el.css({ position: 'relative', top: 'auto', left: 'auto' }); this._renderProxy(); @@ -586,7 +586,7 @@ $.ui.plugin.add("resizable", "containment", { ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position, pRatio = o._aspectRatio || e.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement; - if (ce[0] != document && /static/.test(ce.css('position'))) + if (ce[0] != document && (/static/).test(ce.css('position'))) cop = self.containerPosition; if (cp.left < (o.helper ? co.left : cop.left)) { @@ -621,10 +621,10 @@ $.ui.plugin.add("resizable", "containment", { var helper = $(self.helper), ho = helper.offset(), w = helper.innerWidth(), h = helper.innerHeight(); - if (o.helper && !o.animate && /relative/.test(ce.css('position'))) + if (o.helper && !o.animate && (/relative/).test(ce.css('position'))) $(this).css({ left: (ho.left - co.left), top: (ho.top - co.top), width: w, height: h }); - if (o.helper && !o.animate && /static/.test(ce.css('position'))) + if (o.helper && !o.animate && (/static/).test(ce.css('position'))) $(this).css({ left: cop.left + (ho.left - co.left), top: cop.top + (ho.top - co.top), width: w, height: h }); } |