Commit Graph

77 Commits

Author SHA1 Message Date
Jörn Zaefferer
cfa6aa328e Position: offset() always returns null for window, so provide default 0/0 coordinates to avoid checks further down 2012-04-20 14:13:52 +02:00
Jörn Zaefferer
be3af5bc64 Position: Move Math.abs/max definitions to the top of the file 2012-04-20 14:09:17 +02:00
Jörn Zaefferer
d3dc637b65 Position: Cleanup variable definitions, move undefined vars to the top 2012-04-18 16:43:25 +02:00
Jörn Zaefferer
f594c0623a Position: Make getOffsets and parseCss helpers local functions, no need to expose those 2012-04-18 00:30:47 +02:00
Jörn Zaefferer
a5fc9eb7db Position: Expose target and element dimensions to allow further customization, like calculating the angle between the two elements 2012-04-13 16:05:29 +02:00
Jörn Zaefferer
cb67eb535c Position: Cache the scrollbarWidth calculation result 2012-04-13 15:12:37 +02:00
Jörn Zaefferer
7dcfae7da2 Position: Extract getWithinInfo method, use that for tests that call getScrollInfo directly, pass within info to that, gets rid of a few more DOM accesses 2012-04-13 15:05:43 +02:00
Jörn Zaefferer
c0a5e52f87 Position: Finish refactoring of within data 2012-04-13 14:46:43 +02:00
Jörn Zaefferer
59b93a7dac Position: Refactor within-data to avoid calculating that more then needed. Not quite done, but good enough for now 2012-04-12 18:33:31 +02:00
Jörn Zaefferer
8c76fe38bf Position: Inline center variable. Not necessary with gzip (or a good minifier) in place, wasn't consistent with other inline strings 2012-04-12 17:48:01 +02:00
Jörn Zaefferer
1779d86b40 Position: add target property to feedback argument, to allow additional calculation in user's using callback 2012-04-12 17:33:05 +02:00
Jörn Zaefferer
2154ca552a Position: Cache Math.abs and Math.max lookups 2012-04-12 17:14:03 +02:00
Jörn Zaefferer
58d5452a7c Position: Refactor css parse calls 2012-04-12 17:10:51 +02:00
Jörn Zaefferer
6ffc4adf06 Position: Calculate scrollInfo just once, not for each element 2012-04-12 16:57:51 +02:00
Jörn Zaefferer
08c8aedf80 Position: Refactor offset calculations 2012-04-12 16:56:54 +02:00
Jörn Zaefferer
0c5c2c7055 Position: Restrict the center/middle priority to target < element cases 2012-04-12 16:14:16 +02:00
Jörn Zaefferer
d077f9b360 Position: Improve feedback API by giving the center/middle position more weight. Also removed themeswitcher from test pages, now load faster 2012-04-12 01:32:30 +02:00
Jörn Zaefferer
623e8e68b4 Position: Mini refactoring, avoids proxying using callback multiple times if more then one element is positioned 2012-04-11 00:19:26 +02:00
Jörn Zaefferer
c0cceee8e4 Position: Fix single var, whitespace. Clone targetOffset to avoid reading that twice 2012-04-10 23:41:41 +02:00
Jörn Zaefferer
e5ba731019 Position: Use a separate object and argument for the feedback information, keeping position props as they were 2012-04-10 22:16:38 +02:00
Jörn Zaefferer
479530bb61 Position: First draft for a new notification API, via using callback, telling you were the of-element is, not just when something flipped. New test page demonstrates usage 2012-04-10 18:15:30 +02:00
kborchers
cd90e57f22 Merge branch 'positionWithin' 2012-04-04 22:12:11 -05:00
Jörn Zaefferer
79f1eea6dc Build: Filter filters for linting to exclude some to-be-rewritten ones. Fix lint in those remaining 2012-04-04 11:02:08 +02:00
kborchers
e7701e2efa Position: Fixed issue with offsets using the within option which caused flips to not happen when the containing element had been scrolled. 2012-04-03 21:08:34 -05:00
Scott González
ccbfd45924 A few lint fixes. 2012-04-02 15:55:50 -04:00
Jo Liss
37dcc3e21d Protect all copyright notices against minification
For instance, this is useful for the jquery-ui-rails gem, which does not
use jQuery UI's own minification, but relies on Rails to minify the
files where necessary. Rails in turn uses UglifyJS for JS and YUI for
CSS, both of which respect the /*! ... */ convention.
2012-04-02 15:21:06 +02:00
Scott González
932fe888c0 Updated copyright year. 2012-03-08 10:53:08 -05:00
jdomnitz
57fe6ed01d JavaScript "strict mode" fixes 2012-02-12 19:58:56 -05:00
Scott González
609243b21d Use jQuery.css() instead of deprecated jQuery.curCSS(). 2012-02-12 09:01:06 -05:00
Rick Waldron
07ec849f62 Position: Update fullname reference; jQuery => $. Fixes #8029 - Position: There is a reference to the global jQuery variable. 2012-01-19 08:21:54 -05:00
Scott González
3de7d8b68c Position: Check for fraction support. 2011-11-02 11:09:00 -04:00
kborchers
7f808b2047 Position: Check to also make sure to only flip if more of the element is inside "within" 2011-09-16 11:52:22 -05:00
kborchers
80bbebd489 Position: Added better collision detection for flip and fit, added visual tests for each and updated the unit tests to take the changes into account. In the process, I removed the rounding that was being done to the position since older jQuery couldn't handle the fractions. There was another pull for this same issue and I have merged the unit tests from that pull into this commit. Also added flipfit! 2011-08-12 22:19:52 -05:00
Benjamin Sterling
d5452c0ec2 Position: Add flip-classes. Fixes #5937 - Position: Add ability to determine if the element is flipped via css 2011-07-11 19:49:56 -04:00
Scott González
154c5e5fd1 Position: Coding standards. 2011-06-10 16:07:03 -04:00
tashekelahi
19dcac2129 Position: added check for undefined value of offset. Fixed #7458 - ui.position offset property creates error when set to undefined 2011-06-09 21:05:33 -04:00
David Murdoch
40c0088721 Fix visual test in IE6 and move the new helper functions for getting scrollbar properties to $.position 2011-05-26 14:22:12 +00:00
David Murdoch
cde7cc0e6f updated tests to account for scrollbar width/height 2011-05-26 01:15:05 +00:00
David Murdoch
c11ac9c3f3 Now takes scrollbar width into account in collision detection 2011-05-26 00:53:16 +00:00
David Murdoch
e4a42991df Removing unnecessary variables, caching 'within' in tests where its beneficial, and making some other changes based on the code review 2011-05-16 23:46:21 +00:00
David Murdoch
cf96d22532 position now passes all tests! 0/ 2011-05-13 21:57:16 +00:00
David Murdoch
939b6989c7 Update position to work properly when window and/or within element is scrolled. 2011-05-13 20:54:25 +00:00
David Murdoch
2f4da6f13d Update var name to avoid confusion 2011-05-13 19:17:42 +00:00
David Murdoch
b6497996ce Replace comma with semi-colon. How'd that get there? 2011-05-12 13:28:01 +00:00
David Murdoch
9e4e359705 fix spacing and add in a missing comma 2011-05-11 16:52:43 -07:00
David Murdoch
abf3a86c8b Fix issue when window is "within". 2011-05-11 16:44:20 -07:00
David Murdoch
c6afaa1072 Fix #5645 - Position: Allow for arbitrary element to be containing element 2011-05-11 16:30:21 -07:00
Jean-Francois Remy
5e44b3ce88 Position: Handled scrolled windows properly with collision: fit. Fixes #7211 - Position: Collision: fit doesn't work at top of window when scrolled. 2011-05-03 04:38:17 -04:00
Scott González
221dcd7027 Position: Coding standards. 2011-03-22 13:12:03 -04:00
Scott González
6f051d5d6a Position: Merged offset option into my and at options and added support for percentage-based offsets. Fixes #6981 - Position: Merge offset option into my and at options. Fixes #7028 - Position: Allow percent-based offsets. 2011-03-22 12:25:25 -04:00