Jump to content
Search Community

OxXxigen

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by OxXxigen

  1. i need to get different values from different tweens and getBoundingClientRect cause browser reflow, don't think it's good idea do this.

    maybe tm store somewhere values that set ?

  2. how can i get current tween values

    TweenMax.to(div, 2, {
      css: {
        top: 200,
      },
      onUpdate(self) {
        // get current top value
        console.log(self.vars.css.top);
      },
      onUpdateParams: ["{self}"],
    });

     

  3. _getOffset2DMatrix = function(e, offsetOrigin, parentOffsetOrigin, zeroOrigin, isBase) {
    				if (e === window || !e || !e.style || !e.parentNode) {
    					return [1,0,0,1,0,0];
    				}
    				var cache = e._dCache || _cache(e),
    					parent = e.parentNode,
    					parentCache = parent._dCache || _cache(parent),
                       
    _cache = function(e) {
    				if (Draggable.cacheSVGData !== false && e._dCache && e._dCache.lastUpdate === TweenLite.ticker.frame) {
    					return e._dCache;
    				}
    				var cache = e._dCache = e._dCache || {},
    					cs = _getComputedStyle(e),


    as we can see, function "_getOffset2DMatrix" has check for "!e.style" but into function "_cache" we send "e.parentNode". "_cache" function has no checks 

    and try to get computed style. in this case

    e.nodeName === 'HTML' && e.style && !e.parentNode.style
    // e.parentNode is frame.contentWindow.document

     

  4. i use it to know, when element change size/position.

    for example, i have element A, and element B which behaves like a reflection in a mirror.
    element A can change it size/position from a different places, and when i create element B, i just whant to cacth all tweens, and check target , if it's element A, then do what i do.

  5. Hi, i have a problem, i need to know if any element on the page start/end tweening with TweenMax. Can i add something like global callback, that will fire on every tween start/end.
    P.S. sorry for my bad english.

  6. thanks for answer.. 

    but problem doesn't in that.....code for example
    part of TweenMax.min.js

    z = function(t, e) {
        var i, s = {};
        for (i in t) B[i] || i in e && "transform" !== i && "x" !== i && "y" !== i && "width" !== i && "height" !== i && "className" !== i && "border" !== i && "position" !== i || !(!E[i] || E[i] && E[i]._autoCSS) || (s[i] = t[i], delete t[i]);
        t.css = s
    }
    

    as i understood this is function that convert params obj assigned to function, into Obj.css

    and when this function check "position" key, look at the "|| i in e &&" part of code..

    in this part original lib diside that "position" need to be called becouse of mootools add method position to DOM elements.

    i fix it added "&& "position" !== i" part of code to originl lib.

     

    sorry for bad english.

  7. sorry for bad english.
    If use mootools and try to change "position" attribute, autoCss function GSAP  detect "position" in target and don't add it to vars.css, becouse mootool add "position" method to Node prototype.

    i fix it in my local machine, but...

    where can i write, to fix it in future?

×
×
  • Create New...