Browse Source

Fix bug in shape when passing jq object

pull/1191/merge
jlukic 10 years ago
parent
commit
a4b6a798ce
2 changed files with 10 additions and 7 deletions
  1. 1
      RELEASE NOTES.md
  2. 16
      src/definitions/modules/shape.js

1
RELEASE NOTES.md

@ -65,6 +65,7 @@
- **Rating** - Rating can now automatically generate icons without including them
- **Rating** - Rating can use data attributes to specify individual ratings
- **Sidebar** - Sidebar now has tall / very tall variations for resizing top/bottom sidebars
- **Shape** - Shape now more accurately calculates size before transitions
- **Steps** - Steps can now have icons, descriptions and titles. Step default theme has been modified significantly to be more flexible.
- **Table** - Tables now have 'basic' and 'very' basic variations
- **Transition** - Transition will now keep block position of elements hidden with visibility hidden

16
src/definitions/modules/shape.js

@ -56,7 +56,7 @@ $.fn.shape = function(parameters) {
$side = $module.find(selector.side),
// private variables
nextSelector = false,
nextIndex = false,
$activeSide,
$nextSide,
@ -190,7 +190,7 @@ $.fn.shape = function(parameters) {
? $activeSide.next(selector.side)
: $module.find(selector.side).first()
;
nextSelector = false;
nextIndex = false;
module.verbose('Active side set to', $activeSide);
module.verbose('Next side set to', $nextSide);
},
@ -217,8 +217,8 @@ $.fn.shape = function(parameters) {
var
$clone = $module.clone().addClass(className.loading),
$activeSide = $clone.find('.' + settings.className.active),
$nextSide = (nextSelector)
? $clone.find(nextSelector)
$nextSide = (nextIndex)
? $clone.find(selector.side).eq(nextIndex)
: ( $activeSide.next(selector.side).size() > 0 )
? $activeSide.next(selector.side)
: $clone.find(selector.side).first(),
@ -231,7 +231,7 @@ $.fn.shape = function(parameters) {
width : $nextSide.outerWidth(),
height : $nextSide.outerHeight()
};
$clone.remove();
//$clone.remove();
$module
.css(newSize)
;
@ -239,9 +239,11 @@ $.fn.shape = function(parameters) {
},
nextSide: function(selector) {
nextSelector = selector;
$nextSide = $module.find(selector);
nextIndex = selector;
$nextSide = $side.filter(selector);
nextIndex = $side.index($nextSide);
if($nextSide.size() === 0) {
module.set.defaultSide();
module.error(error.side);
}
module.verbose('Next side manually set to', $nextSide);

Loading…
Cancel
Save