animateTransform


#1

I am trying to call dojox.gfx.animateTransform() function but get an error that this is not a function. I see that it is located in fx.js file in gfx directory. I am using version 1.7. Can you tell me what I am doing incorrectly? I am trying to do a linear transformation (move a line right) using your example in the documentation. See code below:

var vline = surface.createLine({ x1: parseInt(TIC_XPOS), y1: 0, x2:parseInt(TIC_XPOS), y2:10 })
vline.setStroke("black");

vline.connect("onclick",function(e)
{
    // Create an animation of the group
    var animation = dojox.gfx.animateTransform({
    duration: 700,
    shape: vline,
    transform: [{dx: 5, dy: 10}]
    });

    // Showtime!
    animation.play();

    /*
    gfx.animateTransform{{
    shape: shape,
    duration: 500,
    transform: [
    {name: "translate", start: [0, 0], end: [200, 200]},
    {name: "original"}
    ]
    }).play();
    */

});

I have tried using the following dojo.require statements:
dojo.require(“dojox.gfx”);
dojo.require(“dojox.gfx.fx”); // this does not exist so tried with and w/o.

However, I do not have a fx directory under the gfx directory and some of your documentation says to include this but it does not exist and also some documentation says to use this as a function and other to use as a constructor and I get errors for both. Can you please tell me the best ways to move a shape?

Thank You,
Renee


#2

This question was answered via direct email… the example above was using a mix of pre-AMD and post-AMD APIs. An example was provided for Renee for pre-AMD which works with their Dojo 1.6.x application.