Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix image loading conflict with video #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjstark
Copy link
Member

@sjstark sjstark commented Jun 2, 2021

The order of the switch statement in supports-images.coffee was leading to conflicts while rendering a visual that had potential to have either video or image. Reordered the switch and made a return if an image was found to be loaded.

@weotch
Copy link
Member

weotch commented Jun 2, 2021

The reason it is the way it is now is so that if a video and image are supplied, the video replaces the image when loaded. Like in this case: https://bkwld.github.io/vue-visual/?path=/story/loading--progressive

Can you tell me more about the issue you were running into? Nvm, I see it now!

@@ -12,14 +12,12 @@ export default

# Determines whether the image should be shown via v-show
showImage: -> switch
# Image has finished loading
when @imageLoaded then return true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this mean that we'd always be showing the image? Like, the when @videoLoaded then false would never be met with this change.

Why does this fix the issue with the trapezoid shadow? Is it because we never transition out this image, so you can never see through it to the shadow? Maybe another way to solve would be to change the transition so that the "leave" portion of the transition has a transition-delay that is equal to the enter portion. And then no transition-duration. So the leaving image never fades out, it just disappears once the video finishes transitioning in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants