Я использую Nativescript Vue и пытаюсь повернуть текст в теге TextView с помощью Nativescript-Gesture Ротация. Текст вращается, но не плавно, он перескакивает с одного направления на другое. И это мой вопрос
Почему это происходит? В чем причина того, что NS-Gesture Rotation ведет себя так странно? И как заставить его работать?
Я опубликую свой пример здесь и на NS Playground. слишком.
<template>
<Page class="page">
<ActionBar title="Home" class="action-bar" />
<StackLayout class="home-panel">
<TextView @rotation="onRotation" id="liveLabel" textWrap="true"
:rotate="textRotation" editable="false">
<FormattedString id="formString">
<Span id="spanText" text="Test text" fontSize="20"
color="red" />
</FormattedString>
</TextView>
</StackLayout>
</Page>
</template>
<script>
export default {
data() {
return {
textRotation: 0
};
},
methods: {
onRotation(args) {
console.log(
"Rotate angle: " + args.rotation + " state: " + args.state
);
this.textRotation = Math.floor(args.rotation);
}
}
};
</script>