Prettier long lines

master
Chakib Benziane 12 years ago
parent b5fa5ae326
commit 57dc5935a1

@ -91,24 +91,51 @@
var left = this.$parentPosition.left + this.$parentWidth var left = this.$parentPosition.left + this.$parentWidth
switch (this.options.alignement) { switch (this.options.alignement) {
case 'top': case 'top':
this.$top = (this.$currentBtnNb * this.$height) - this.$height + this.$parentPosition.top + (space * (this.$currentBtnNb - 1)) this.$top = (
(this.$currentBtnNb * this.$height) -
this.$height +
this.$parentPosition.top +
(space * (this.$currentBtnNb - 1))
)
break; break;
case 'center': case 'center':
{ {
if (this.$currentBtnNb === 1) if (this.$currentBtnNb === 1)
{ {
this.$top = (this.$parentHeight / 2) - (this.$height / 2) + this.$parentPosition.top this.$top = (
this.$parentDiv.data('top-space', this.$parentHeight / 2 - (this.$height /2)) (this.$parentHeight / 2) -
this.$parentDiv.data('bottom-space', this.$parentHeight / 2 - (this.$height /2)) (this.$height / 2) +
this.$parentPosition.top
)
this.$parentDiv.data('top-space',
(this.$parentHeight / 2 - (this.$height /2))
)
this.$parentDiv.data('bottom-space',
(this.$parentHeight / 2 - (this.$height /2))
)
} }
else if (this.$currentBtnNb % 2 === 0) { else if (this.$currentBtnNb % 2 === 0) {
this.$top = this.$parentDiv.data('top-space') - (this.$height) + this.$parentPosition.top this.$top = (
this.$parentDiv.data('top-space', this.$parentDiv.data('top-space') - this.$height ) this.$parentDiv.data('top-space') -
this.$height +
this.$parentPosition.top
)
this.$parentDiv.data('top-space',
this.$parentDiv.data('top-space') - this.$height
)
} }
else { else {
this.$top = this.$parentHeight - this.$parentDiv.data('bottom-space') + this.$parentPosition.top this.$top = (
this.$parentDiv.data('bottom-space', this.$parentDiv.data('bottom-space') - this.$height ) this.$parentHeight -
this.$parentDiv.data('bottom-space') +
this.$parentPosition.top
)
this.$parentDiv.data('bottom-space',
this.$parentDiv.data('bottom-space') -
this.$height
)
} }
break; break;

Loading…
Cancel
Save