Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Scale image from corner

$
0
0

Am animating (scaling) an imagen like:

var zoomScale = false;
imagenNota.addEventListener('doubletap', function(e) {
        var t = Titanium.UI.create2DMatrix();
        if (!zoomScale){    
            t = t.scale(2.0);
            $.viewContenidoFoto.animate({
                transform:t,
                right: 10,
                bottom: 100,
                duration:500
            });
            zoomScale = true; 
        }else{
            $.viewContenidoFoto.animate({
                transform:t,
                duration:500
            });
            zoomScale = false;
        }
    });
This is the sequence when the event is fired:

img1

img2

img3

But, I need to scale the image from its right/bottom corner. Something Like:

img3

Considering the image initially has a margin 5 from right and 5 from its bottom, how can animate and anchor the image to its right and to its bottom?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>