Jump to content
Search Community

kharm

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by kharm

  1. @Jamie : You're right, I've misused the autoKill when trying to use this parameter before. Instead of TweenMax.to( obj, delay, { scrollTo : { y : targetY, autoKill : false} }; I use TweenMax.to( obj, delay, { scrollTo : { y : targetY}, autoKill : false }; Thanks.. It works now for the stopping scroll problem.. @Carl : Okay Carl, I'll use it next time.. I've already found the solution for my current sample problem, [ even unfortunately still won't work in my actual project and I can't imitated/simplified the problem right now ]. Thanks. Anyway for anyone who face the same flickering issue in safari, you could try to add : -webkit-transform-style: preserve-3d; -webkit-backface-visibility: hidden; in the animating object, it works well in my current example..
  2. Another problem I face using this scrollTo plug in is sometimes it stop updating the scrollTop value [ again using the safari ]. Don't know if this behaviour is correlated with the jittering problem. Here is the case : http://www.digital-hedge.com/pen/scrollToAsk2.html To trigger the problem scroll to the bottom of the page, and click the 'link to 1000px' button. Repeat this several times, the tweening function will stop at the middle of animation. Thanks.
  3. Hi, I'm having trouble with scrollTo plugins, it gives jitter effect in safari, whilst it shows good animation in firefox / chrome. Here is the case : www.digital-hedge.com/pen/scrollToAsk.html Turn on the web inspector in safari to see more jitter effect in this page. My current project show more jitter effects, seems because heavier animation in my page. Any idea? Thanks. I'm using Mavericks 10.9.2, Safari 7.0.2, TweenMax 1.11.5 and scrollToPlugin 1.7.3 scrollTo.zip
  4. Okay, thanks for the reference jonathan,
  5. Thanks Jamie, I'm new to know about this reflow/repaint method. And all the information I know is based on article with several shallow experiment. I don't even know how to read/observe the reflow event in Chrome Dev Tools, before. Made me a bit unsure to understood your first comment about not a single layout occurred, sorry. Seems the tween._propLookup.scrollTo is the thing I'm looking for, even unfortunately it's private object. Anyway I'm using window.pageYOffset right now as recommended in this article https://gist.github.com/Warry/4254579 [ 'Beware of reflows' section ] and it's not included in the http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html list, eventhough I haven't found any difference with window.scrollY in my current observation.
  6. *update* I have try to simulate the calculation by using tween.progress() to get the current tweening value, but the cost seems even higher than using window.scrollY itself. [ roughly observed in chrome timeline ] here is my code : TweenMax.to( window, 0.3, { scrollTo : { x:0, y : slideTo }, onUpdate : function ( _pageContainer, tween, initial, deltaY ) { _pageContainer.updatePositionData( initial + tween.progress() * ( deltaY ) ); }, onUpdateParams : [ this, '{self}', initial, slideTo - initial ], ease : Power1.easeOut } ); Sorry, if it's "insignificant problem", I'm just curious if it's possible to get the tweenmax calculated value in the update event.
  7. Hi, Jamie, In the optimization part, the article tells us, // first loop is going to do all // the reflows (since we use offsetTop) for(var m = 0; m < movers.length; m++) { mover = movers[m]; moverTop[m] = mover.offsetTop; Even 'it can't be seen', document reflow occurs when we get offsetTop property ( CMIIW ). And referring to this one [ reference from that article ] : http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html Reading window.scrollY value will also trigger browser reflow, which means unnecessary if we can get instant access to the current tween value.
  8. Hi, I'm an old fan of TweenMax in AS, so happy to see this library ported to Javascript.. I've a question regarding performance optimization in my website, is there a way to get window.scrollY property while we are tweening with TweenMax scrollTo Plugin? [ I need to use it inside onUpdate function ] I've read several articles that accessing window.scrollY value will cause document reflow in the browser. So, I thought it would be good if I can get the current tweening value, without accessing window.scrollY property. * http://www.html5rocks.com/en/tutorials/speed/animations/ Thanks.
×
×
  • Create New...