Giter Club home page Giter Club logo

Comments (2)

joshtynjala avatar joshtynjala commented on August 17, 2024

I'm not sure that I understand your proposal.

Let's assume that a Slide transition's duration is 2 seconds. Here are some scenarios that explain how it should behave with the current behavior when playing in reverse (this._duration * this._position):

  1. The starting position is 1.0 (at the end). Playing in reverse will require the entire duration: 2 seconds.
  2. The starting position is 0.5. Playing in reverse should require sliding half the x/y distance, so the reverse duration is calculated as half the original duration too: 1 second.
  3. The starting position is 0.0 (at the beginning). It is already fully reversed. No animation needs to play because the final x/y is the same as the starting x/y: 0 seconds duration.

Here's how it would behave with your proposed new behavior when playing in reverse (this._duration * (1 + this._position)):

  1. The starting position is 1.0 (at the end). Playing in reverse will require 4 seconds (2 * (1 + 1)). That's twice as long as the original duration, for the same distance. It should never be more than 2 seconds.
  2. The starting position is 0.5. Playing in reverse will require 3 seconds (2 * (1 + 0.5)). It will slide only half the x/y distance, but the duration is (again), over 2 seconds.
  3. The starting position is 0.0 (at the beginning). Playing in reverse will require 2 seconds (2 * (1 + 0)), but there is nothing to see because the starting x/y is the same as the final x/y.

from feathersui-starling.

2jfw avatar 2jfw commented on August 17, 2024

Thanks for the input on this - seems I was on the wrong track with the workaround, which actually worked quite well in my scenario to fix the very short resulting duration, but it's obviously wrong.
I will probably need to check more in depth regarding the position property.
I set the distance (/ratio) to perform the successful drag to a lower value as the default and I will have to check if this is causing the low duration.

from feathersui-starling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.