Comments (4)
Regarding the "Animate to" logic. The time it takes to animate from A to Z, needs to be the same, regardless of the value of Z. Meaning that larger numbers should animate in the same time that it takes smaller numbers.
from neodigm55.
We may want to separate this from the KPI component. I can see this being useful in CTA as well as just plain HTML. This seems like an implementation of neodigmMetronome.
from neodigm55.
Update the Metronome enhancements are done in v2.5. This is a non-breaking change. It's subscribe method now supports a third parameter (mx) that is the maximum number of times to fire this function.
tick: function( t ){
if( bIsInit && !bIsPause ){ oEmit[ t ].forEach( ( f )=>{
if( oEmit[ t ].mx || oEmit[ t ].mx == 0 ){
if( oEmit[ t ].mx ){ f( --oEmit[ t ].mx ) }
}else{ f() }
} ) }
return neodigmMetronome;
},
subscribe: function( f, t, m ){ // Usage: .subscribe(f, 1000, 5)
if( bIsInit ){
let _t = t, _m = m
if( !oEmit[ _t ] ){
oEmit[ _t ] = []
aIntv.push( setInterval( ()=>{ neodigmMetronome.tick( _t ) }, _t ) )
}
oEmit[ _t ].push( f )
oEmit[ _t ].mx = _m
}
return neodigmMetronome;
}, // TODO
from neodigm55.
This is complete in v2.5. Usage:
onclick="neodigmUtils.countTo( '.countToTarget', neodigmUtils.f02x( 76 ) )"
from neodigm55.
Related Issues (20)
- Neodigm ActIcon | Decl Tulip not firing | The API does work via JS HOT 2
- Neodigm Tulip | Ghost Marquee text on the Light (ampm) gray (negative) shadow is difficult to read HOT 1
- Neodigm Wired4Sound | Improve generated sound options (24) HOT 1
- Neodigm Wired4Sound | Expose methods to better control volume. HOT 2
- Neodigm Soda Pop | Add Statefull Iconification HOT 3
- Neodigm Carousel | Named Regions (unique string representing an instance of a region or page) HOT 2
- Neodigm Tulip | Grandfather element declarative issue HOT 2
- Neodigm Enchanted CTA | Border visual artifact on top or bottom of buttons is a defect HOT 1
- All Components | Standardize data attrib -hover (no more mouseenter or mouseover) HOT 1
- All Components | Retire srcElement logic HOT 2
- Neodigm SodaPop | Life Cycle Events HOT 4
- Neodigm PopTart | Specific On Close Life Cycle Callback not working HOT 1
- Neodigm Poptart | Optional Hover dismiss behavior - Closed when mouse is off both bound element and Poptart HOT 2
- Promote Release Candidate 3.0 HOT 1
- Neodigm Marque | Calling init seams to speed up the display HOT 2
- Neodigm Utils | New typeOn function. Progressive text. HOT 5
- Neodigm Carousel | getName method HOT 2
- Neodigm Soda Pop, Toast, Enchanted CTA, Pop Tart, ActIcon, Wired4Sound, and KPI - Right Click and Scroll into View Events
- Neodigm SodaPop | Create a ModalWarn life cycle event HOT 1
- Neodigm Utils Shake | Accept an Element ref or a query string HOT 4
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 neodigm55.