1
0
Fork 0

canvas: add helper to get translation of canvas.Elements.

This commit is contained in:
Thomas Geymayer 2014-03-19 22:32:36 +01:00
parent 71c4c85511
commit 313175b943

View file

@ -209,6 +209,14 @@ var Element = {
},
# Shortcut for setting translation
setTranslation: func { me._getTf().setTranslation(arg); return me; },
# Get translation set with #setTranslation
getTranslation: func()
{
if( me['_tf'] == nil )
return [0, 0];
return [me._tf.e.getValue(), me._tf.f.getValue()];
},
# Set rotation around transformation center (see #setCenter).
#
# @note This replaces the the existing transformation. For additional scale or