Comments (10)
I suppose I should probably add that, as well. 🙂
I should be able to tackle these next week!
from drift.
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.
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.
I guess another question is how to toggle the Drift on and off. Thanks
from drift.
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.
I edited the above example, so you should click through to the thread to see that. Whoops!
from drift.
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.
Hey @a2rampal, thanks for your patience on this! I've added + released as 0.4.0.
from drift.
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
from drift.
Hey @RosemolJ, can you set up a CodePen (or similar) showing this issue in action?
from drift.
Related Issues (20)
- document is undefined when library included in SSR application HOT 1
- The image is loading twice HOT 1
- I would like to Drift over more than one image HOT 2
- NPM package README needs to be updated HOT 2
- Demo url on readme.md file points to 404 error
- Action Required: Fix Renovate Configuration
- Content-Security-Policy blocking inline styles HOT 3
- The demo on the index.html page from the drift-main folder works very crookedly. HOT 2
- Dependency Dashboard
- Add passive option to event listeners HOT 4
- feat: lazy-load images HOT 3
- The automated release is failing 🚨
- Passive event listeners don't allow preventDefault() HOT 5
- paneContainer is moving with touch dragging HOT 4
- Is there a way to show the zoomed area around the mouse? HOT 1
- feat: add zoom right to left support HOT 6
- TypeError: driftImgs.map is not a function HOT 2
- Call for Maintainer(s) HOT 11
- Is there RTL exemple
- Documentation for usage in react? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drift.