I'm using stellar.js and iscroll-probe.js (part of iScroll 5), to handle scrolling on a mobile device, in a HTML5 app built with Ionic (using Cordova).
My issue is that I am telling stellarJs to scroll using transforms
scrollProperty: 'transform',
Now when the page is at the top, and the user drags it down, I apply a css scale to the element so it grows.
document.getElementById('imageHolder').style["-webkit-transform"] = "matrix(" + scaleVar + ", 0, 0, " + scaleVar + ", 0, 0)";
This scales it but there is a flicker. This is because Stellar.js constantly overwrites the transform on the element with
translate3d(0px, -5px, 0px)
(If the page is 5 px down)
If I console log my transform value I get something like this:
matrix(1.02, 0, 0, 1.02, 0, 0)
translate3d(0px, -1px, 0px)
translate3d(0px, -0.5px, 0px)
matrix(1.00666666666667, 0, 0, 1.00666666666667, 0, 0)
translate3d(0px, 0px, 0px)
Any idea how I can overcome this? can I append the transforms?
I tried
"matrix(" + cssVar + ", 0, 0, " + cssVar + ", 0, " + this.y / 2 + ")";
but it doesn't help, it still overwrites and it actually makes the animation worse.
Any help would be appreciated