INNER CODE UNIT · JavaScript
shiftToCorrectChar
vasani-arpit/Social-Media-Automation · libs/numberAnimate.js:135
var shiftToCorrectChar = function () {
shiftToChar(holderDiv, character, shiftTime);
};
//shift if after creation and after attachment if animating..
if (creationTime) {
//bit of a hack - transition will only work if the element is attached to the DOM
//so use a timeout to make this possible (no onattached event)..
setTimeout(function () {
bindToTransitionEndForSingleRun(holderDiv, shiftToCorrectChar, creationTime);
var holderStyle = holderDiv[0].style;
holderStyle[css3Prefix + 'Transition'] = "all " + creationTime + "ms ease-in-out";
holderStyle.width = width + "px";
}, 20);
} else if (shiftTime) {
setTimeout(shiftToCorrectChar, 20);
} else {
shiftToCorrectChar();