Comments (3)
This should be doable: https://stackoverflow.com/questions/41424989/javascript-listen-for-attribute-change
Relevant docs: https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
from wiv.js.
Simple implementation here, not opening a PR yet because it includes some other not-yet-merged changes: bendemeyer@56914a3
Note that this refreshes all the attribute-based cache fields for a given wiv when any attribute change takes place. This could be addressed in the future if that optimization seems worthwhile.
Also, potentially a bigger concern, editing the height or thickness attributes will cause the wiggles to adjust accordingly, but will not resize the canvas or the content elements. The fix for this would be to factor the sizing of those elements into a specific function, then work our way up the DOM tree calling it for every wiv we encounter.
from wiv.js.
@bendemeyer everything looks good, including the resizing 😀
from wiv.js.
Related Issues (20)
- Slight cutoff of wiggle on right and bottom wiggle HOT 1
- Performance Enhancements HOT 1
- Calculate true intersection of wiggles HOT 2
- Change license to MIT HOT 1
- Add links to react and vue version in readme HOT 1
- Refactor animateLines function HOT 1
- Add support for images
- npm install dependent on operating system
- Add ability to fill wivs with background color HOT 3
- Refactor: Don't have everything in one file
- Wiv animation jumping HOT 2
- Add configuration for what side of the div should have wiggles applied
- Activate and deactivate wiggling based on CSS selector match
- Corner Cleanup
- Bug: Setting speed to "0" results in falling back to standard speed
- Set padding to exact used level.
- Support "scroll" images as well as "bounce"
- Wiggle speed is dependent on FPS HOT 1
- Performance: Only animate wivs that are visible in the current frame
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 wiv.js.