Text truncates yOffset!?
I tried to create a plugin for supporting the E-Z Play (c) music notation, which helps newcomers to remember the name and position of notes as the name of the note is written inside its head - see also this previous discussion .
Now I am stuck with an odd behaviour of text.yOffset. If I assign value with fractions (e.g. 4.5) to text.yOffset, the fractional part gets truncated:
var text = new Text(curScore); text.text = cursor.chord().topNote().name; text.yOffset = 4.5; cursor.putStaffText(text); </p text.yOffset is 4 after executing these lines. However, if I change the yOffset via menu, I can set it to any fractional (real) numbers and the text will change its position.That's how it should behave, inline with the online references for Text. Do you have any idea whether this behaviour is already knows (at least I couldn't find it in the documentation and the forums) and whether it is a bug or a feature.
Comments
It's a bug in the plugin interface. The
yOffset
property is parsed as an integer. There is nothing you can do for now...In reply to It's a bug in the plugin by [DELETED] 5
OK, I stumbled accross this too. guess for now we could adjust the documentation,
http://musescore.org/en/plugin-development/text-object.
I just did ;-)
Is the same true for xOffset too?
In reply to OK, I stumbled accross this by Jojo-Schmitz
Yes it is...
In reply to Yes it is... by [DELETED] 5
OK, now the manual mentiones this too.
In reply to OK, now the manual mentiones by Jojo-Schmitz
Thank you very much for your fast reply. So I'll wait until the bug ist fixed. Do I have to issue a bug report or is that problem already in work - i couldn't find anything similar in the issue tracker.