Please guys, help me out. I have this code:
var image = new ImageSurface({
size: [300, 300],
properties: {
border: '4px solid white'
}
});
image.setContent('/img/' + _.random(1,7) + '.jpg');
var draggable = new Draggable({scale: 1});
image.pipe(draggable);
draggable.on('end', function(e) {
// SURFACE????
});
var stateModifier = new StateModifier();
node.add(stateModifier).add(draggable).add(image);
stateModifier.setTransform(
Transform.translate(100, 10, 0),
{ duration : 1000, curve: Easing.outElastic }
);
How can I get the Surface object from the draggable event? The parameter from the event is just the position.