forked from jpadamsonline/jquerypagewalkthrough.github.com
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#52] Add offsetArrowHorizontal and offsetArrowVertical
- Loading branch information
Craig Roberts
committed
Aug 18, 2014
1 parent
84618ca
commit d4d7f2d
Showing
7 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* James Warwood <[email protected]> | ||
* Craig Roberts <[email protected]> | ||
* Created On: 27/02/2013 | ||
* Version: 2.5.6 | ||
* Version: 2.6.0 | ||
* Features & Bugs: https://github.com/warby-/jquery-pagewalkthrough/issues | ||
***/ | ||
|
||
|
@@ -495,16 +495,21 @@ | |
left = (overlayHoleLeft + (overlayHoleWidth / 2)) - | ||
($jpwTooltip.width() / 2) - 5 + | ||
parseInt(step.popup.offsetHorizontal, 10); | ||
arrowLeft = ($jpwTooltip.width() / 2) - arrow; | ||
arrowTop = ''; | ||
arrowLeft = ($jpwTooltip.width() / 2) - arrow + | ||
parseInt(step.popup.offsetArrowHorizontal, 10); | ||
arrowTop = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowVertical, 10) : | ||
''; | ||
break; | ||
case 'right': | ||
top = overlayHoleTop - (arrow / 2) + | ||
parseInt(step.popup.offsetVertical, 10); | ||
left = overlayHoleLeft + overlayHoleWidth + (arrow / 2) + | ||
parseInt(step.popup.offsetHorizontal, 10) + 105; | ||
arrowTop = arrow; | ||
arrowLeft = ''; | ||
arrowTop = arrow + parseInt(step.popup.offsetArrowVertical, 10); | ||
arrowLeft = (step.popup.offsetArrowHorizontal) ? | ||
parseInt(step.popup.offsetArrowHorizontal, 10) : | ||
''; | ||
break; | ||
case 'bottom': | ||
top = overlayHoleTop + overlayHoleHeight + | ||
|
@@ -513,20 +518,26 @@ | |
($jpwTooltip.width() / 2) - 5 + | ||
parseInt(step.popup.offsetHorizontal, 10); | ||
|
||
arrowLeft = ($jpwTooltip.width() / 2) - arrow; | ||
arrowTop = ''; | ||
arrowLeft = (($jpwTooltip.width() / 2) - arrow) + | ||
parseInt(step.popup.offsetArrowHorizontal, 10); | ||
arrowTop = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowVertical, 10) : | ||
''; | ||
break; | ||
case 'left': | ||
top = overlayHoleTop - (arrow / 2) + | ||
parseInt(step.popup.offsetVertical, 10); | ||
left = overlayHoleLeft - $jpwTooltip.width() - (arrow) + | ||
parseInt(step.popup.offsetHorizontal, 10) - 105; | ||
arrowTop = arrow; | ||
arrowLeft = ''; | ||
arrowTop = arrow + parseInt(step.popup.offsetArrowVertical, 10); | ||
arrowLeft = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowHorizontal, 10) : | ||
''; | ||
break; | ||
} | ||
|
||
$('#jpwTooltip span.' + step.popup.position).css({ | ||
'top': cleanValue(arrowTop), | ||
'left': cleanValue(arrowLeft) | ||
}); | ||
|
||
|
@@ -902,6 +913,10 @@ | |
offsetHorizontal: 0, | ||
// Vertical offset for the walkthrough | ||
offsetVertical: 0, | ||
// Horizontal offset for the arrow | ||
offsetArrowHorizontal: 0, | ||
// Vertical offset for the arrow | ||
offsetArrowVertical: 0, | ||
// Default width for each popup | ||
width: '320', | ||
// Amount in degrees to rotate the content by | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"highlighting", | ||
"guide" | ||
], | ||
"version": "2.5.6", | ||
"version": "2.6.0", | ||
"author": { | ||
"name": "Erwin Yusrizal", | ||
"email": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* James Warwood <[email protected]> | ||
* Craig Roberts <[email protected]> | ||
* Created On: 27/02/2013 | ||
* Version: 2.5.6 | ||
* Version: 2.6.0 | ||
* Features & Bugs: https://github.com/warby-/jquery-pagewalkthrough/issues | ||
***/ | ||
|
||
|
@@ -495,16 +495,21 @@ | |
left = (overlayHoleLeft + (overlayHoleWidth / 2)) - | ||
($jpwTooltip.width() / 2) - 5 + | ||
parseInt(step.popup.offsetHorizontal, 10); | ||
arrowLeft = ($jpwTooltip.width() / 2) - arrow; | ||
arrowTop = ''; | ||
arrowLeft = ($jpwTooltip.width() / 2) - arrow + | ||
parseInt(step.popup.offsetArrowHorizontal, 10); | ||
arrowTop = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowVertical, 10) : | ||
''; | ||
break; | ||
case 'right': | ||
top = overlayHoleTop - (arrow / 2) + | ||
parseInt(step.popup.offsetVertical, 10); | ||
left = overlayHoleLeft + overlayHoleWidth + (arrow / 2) + | ||
parseInt(step.popup.offsetHorizontal, 10) + 105; | ||
arrowTop = arrow; | ||
arrowLeft = ''; | ||
arrowTop = arrow + parseInt(step.popup.offsetArrowVertical, 10); | ||
arrowLeft = (step.popup.offsetArrowHorizontal) ? | ||
parseInt(step.popup.offsetArrowHorizontal, 10) : | ||
''; | ||
break; | ||
case 'bottom': | ||
top = overlayHoleTop + overlayHoleHeight + | ||
|
@@ -513,20 +518,26 @@ | |
($jpwTooltip.width() / 2) - 5 + | ||
parseInt(step.popup.offsetHorizontal, 10); | ||
|
||
arrowLeft = ($jpwTooltip.width() / 2) - arrow; | ||
arrowTop = ''; | ||
arrowLeft = (($jpwTooltip.width() / 2) - arrow) + | ||
parseInt(step.popup.offsetArrowHorizontal, 10); | ||
arrowTop = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowVertical, 10) : | ||
''; | ||
break; | ||
case 'left': | ||
top = overlayHoleTop - (arrow / 2) + | ||
parseInt(step.popup.offsetVertical, 10); | ||
left = overlayHoleLeft - $jpwTooltip.width() - (arrow) + | ||
parseInt(step.popup.offsetHorizontal, 10) - 105; | ||
arrowTop = arrow; | ||
arrowLeft = ''; | ||
arrowTop = arrow + parseInt(step.popup.offsetArrowVertical, 10); | ||
arrowLeft = (step.popup.offsetArrowVertical) ? | ||
parseInt(step.popup.offsetArrowHorizontal, 10) : | ||
''; | ||
break; | ||
} | ||
|
||
$('#jpwTooltip span.' + step.popup.position).css({ | ||
'top': cleanValue(arrowTop), | ||
'left': cleanValue(arrowLeft) | ||
}); | ||
|
||
|
@@ -902,6 +913,10 @@ | |
offsetHorizontal: 0, | ||
// Vertical offset for the walkthrough | ||
offsetVertical: 0, | ||
// Horizontal offset for the arrow | ||
offsetArrowHorizontal: 0, | ||
// Vertical offset for the arrow | ||
offsetArrowVertical: 0, | ||
// Default width for each popup | ||
width: '320', | ||
// Amount in degrees to rotate the content by | ||
|