GithubHelp home page GithubHelp logo

Comments (10)

paulstraw avatar paulstraw commented on August 20, 2024 1

I suppose I should probably add that, as well. 🙂

I should be able to tackle these next week!

from drift.

paulstraw avatar paulstraw commented on August 20, 2024

Hmm… interesting use case. So you basically want it to act like a live viewfinder? How often are you updating the zoom source? I think the biggest issue here would be image load times, unless they're all already cached somehow. Thoughts?

from drift.

a2rampal avatar a2rampal commented on August 20, 2024

I draw the video image to a canvas every 100ms to a second, so only one image is ever in play. Then I execute a toDataURL functon on the canvas to change what data-zoom is using.

from drift.

a2rampal avatar a2rampal commented on August 20, 2024

I guess another question is how to toggle the Drift on and off. Thanks

from drift.

paulstraw avatar paulstraw commented on August 20, 2024

Ah, so it's all local data. That makes things easier. I'm thinking I might just add a public API method for this. How does something like this sound to you?

EDITED:

var drift = new Drift(whateverSourceElement, {
  paneContainer: whateverContainerElement
});

function updateImage() {
  // draw to the canvas etc here

  drift.updateZoomImage();
}

from drift.

paulstraw avatar paulstraw commented on August 20, 2024

I edited the above example, so you should click through to the thread to see that. Whoops!

from drift.

a2rampal avatar a2rampal commented on August 20, 2024

drift.updateZoomImage();

sounds exactly like what I would need.

The other thing is that I click a zoom button to enable and disable zoom. Any idea on the best way to disable the Drift?

from drift.

paulstraw avatar paulstraw commented on August 20, 2024

Hey @a2rampal, thanks for your patience on this! I've added + released as 0.4.0.

from drift.

rosemoljoe avatar rosemoljoe commented on August 20, 2024

Hi

Can anyone help me on this issue ?

updateZoomImage doesn't work properly in Mozilla Firefox.
When changing the url for data-zoom, it doesn't show the loading screen. Instead it shows the previous image loaded. But this works perfectly in Google Chrome and Safari.

It happens when we use different image urls for setting src and data-zoom

@paulstraw

from drift.

paulstraw avatar paulstraw commented on August 20, 2024

Hey @RosemolJ, can you set up a CodePen (or similar) showing this issue in action?

from drift.

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.