Animated backdrop - #657
Open
vanderlee wants to merge 3 commits into
Open
Conversation
This uses jQuery `.animate` to animate the backdrop, which looks really nice. The backdrop is not hidden when moving from one element to another, but is instead moved. Ideally the duration of the animation would be based on whether the backdrop already exists or not (duration 0 if not), but I couldn't find a clean way to check this, somebody else likely will.
houndci-bot
reviewed
Nov 7, 2017
| .height(data.height) | ||
| .width(width - (data.offset.left + data.width)) | ||
|
|
||
| .animate({top: data.offset.top, left: data.offset.left + data.width, height: data.height, width: width - (data.offset.left + data.width) }, duration) |
There was a problem hiding this comment.
Line exceeds maximum allowed length. Length is 161, max is 80.
| .offset(top: data.offset.top, left: 0) | ||
| .height(data.height) | ||
| .width(if data.offset.left > 0 then data.offset.left else 0) | ||
| .animate({top: data.offset.top, left: 0, height: data.height, width: Math.max(0, data.offset.left) }, duration) |
There was a problem hiding this comment.
Line exceeds maximum allowed length. Length is 123, max is 80.
| .offset(top: data.offset.top + data.height, left: 0) | ||
| .height(height - (data.offset.top + data.height)) | ||
| .width(width) | ||
| .animate({top: data.offset.top + data.height, left: 0, height: height - (data.offset.top + data.height), width: width }, duration) |
There was a problem hiding this comment.
Line exceeds maximum allowed length. Length is 142, max is 80.
| .height(if data.offset.top > 0 then data.offset.top else 0) | ||
| .width(width) | ||
| .offset(top: 0, left: 0) | ||
| .animate({top: 0, left: 0, height: Math.max(0, data.offset.top), width: width }, duration) |
There was a problem hiding this comment.
Line exceeds maximum allowed length. Length is 102, max is 80.
Author
|
p.s. I don't do Coffeescript, so the code is probably pretty bad by CS standards. |
Fix for hide/show issues
houndci-bot
reviewed
Nov 14, 2017
| height: $backdropElement.innerHeight() | ||
| offset: $backdropElement.offset() | ||
|
|
||
| $('.tour-step-backdrop').not($backdropElement).removeClass('tour-step-backdrop') |
There was a problem hiding this comment.
Line exceeds maximum allowed length. Length is 88, max is 80.
shaischaudhry
approved these changes
Aug 6, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses jQuery
.animateto animate the backdrop, which looks really nice.The backdrop is not hidden when moving from one element to another, but is instead moved.
Ideally the duration of the animation would be based on whether the backdrop already exists or not (duration 0 if not), but I couldn't find a clean way to check this, somebody else likely will.