Jump to content
Search Community

Copy transform from another object

ninmorfeo test
Moderator Tag

Recommended Posts

Hi
how can i copy transform on object from another one? ( i have to place a dinamic object at same position of exsisting object) 
Console give me this error:
gsap.min.js:10 Uncaught TypeError: Cannot read property 'style' of undefined
    at GSCache.getSetter [as set] (gsap.min.js:10)
    at PropTween._renderPlain [as r] (gsap.min.js:10)
    at PropTween._renderPropTweens [as r] (gsap.min.js:10)
    at _renderZeroDurationTween (gsap.min.js:10)
    at Tween.render (gsap.min.js:10)
    at new Tween (gsap.min.js:10)
    at Object.set (gsap.min.js:10)
    at HTMLDivElement.<anonymous> (tarocchi-zingara-build.js:1152)
    at HTMLDivElement.dispatch (jquery.js?ver=1.12.4-wp:3)
    at HTMLDivElement.r.handle (jquery.js?ver=1.12.4-wp:3)

the code that i try to use is this one:

$('.carta_estratta').on('click', function () {

let z_ogg='#'+$(this).attr('id');

matrice= $(z_ogg).css("transform");

console.log(matrice)

gsap.set('#'+$(this).attr("id") + '_card', {  
    transform: matrice
});

});

in console log i can see result of Matrice....matrix3d(0.6, 0, 0, 0, 0, 0.563816, 0.205212, 0, 0, -0.34202, 0.939693, 0, 685, -96, 0, 1)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...