0

As the jCanvas script hereunder ... The layer rotate as expected, but only 1 time/click. Other clicks are well logged to the console but no rotation of the layer.

Is s.o has an idea/advice ...

pm

    $('canvas').drawImage(
    {
        source: 'image/domino/DOM-T2.png',
        type: 'image',
        name: 'DOM-T2-'+currentLayer,
        groups: ['DOM-T2-'+currentLayer],
        dragGroups: ['DOM-T2-'+currentLayer],
        x: 520, y: 20,
        draggable: true,
        fromCenter: false,
        layer: true,
        click: function(layer) 
        {
            console.log("Rotate"+'DOM-T2-'+currentLayer);
            $('canvas').animateLayer('DOM-T2-'+currentLayer, 
            {
                rotate: 90
            });
        }
    });

    </script>

1 Answers1

0

I found, with help ...

the rotation value is not 'additive', meaning I assigned the value allready contained in rotate and not "rotate: rotate+90".

Hope it may help someone else :)