question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should Velocity continue to auto-remove transform values when they hit default values?

See original GitHub issue

Here is what I’m doing:

        $container
            .find('.pfentry__info')
            .velocity('stop')
            .velocity
                properties:
                    opacity: 1
                    scale: [1, 0.9]
                options:
                    display: 'block'
                    duration: 225

I have this in my CSS:

.pfentry__info {
 opacity: 0;
 transform: scale(0.9);
}

When Velocity is run, it scales with forcefeeding from 0.9 to 1, and then it drops scale(1), but keeps opacity: 1.

How do I fix it ? ( a tmp fix would be to remove the transform from CSS, but I’m thinking that this could be a Velocity bug ? )

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:28 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
MattyBalaamcommented, Jan 15, 2015

As an example if you animate translateY to its default value of ‘0’ you get an inline style left-over ‘transform: translateY(0px);’ Usually this is desired behavior, but the stacking-context as a result of this style can give unwanted results.A previous version of velocity did clear styles when hitting the default, and I wondered if an empty string could be a good way of signalling an intention to clear the style as this is how jQuery’s css function works already.

It seems at the moment I need to clear styles outside of velocity, trying using the hook function with an empty string does nothing. I am worried that in the case of using jQuery’s CSS it will introduce some extra lag - although I am not an expert on the full impact on performance.

0reactions
Rycochetcommented, Aug 13, 2016

v1 is now feature locked, so not changing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apply and control speed changes in After Effects
Learn how to control speed changes in Adobe After Effects using several different methods to achieve smooth and precise results.
Read more >
can Velocity set a default value for a variable when no value ...
I want Velocity to print a default value if there is no value for the variable, I just tried to extends AbstractCotnext and...
Read more >
Expressions - Apache FreeMarker Manual
When you supply values for interpolations or directive parameters you can use variables or more complex expressions.
Read more >
Analyzing RNA-seq data with DESeq2 - Bioconductor
Abstract. A basic task in the analysis of count data from RNA-seq is the detection of differentially expressed genes. The count data are ......
Read more >
Just-in-Time Mode - Tailwind CSS
To use arbitrary values like this in your class names, you need to remove the spaces in things like calc calls, and replace...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found