moved angle calculation within qml file