tp_up
1
Issue
selection.items[0] instanceof Text
always return false, even if a a text object is selected
Expected Behavior
it should return true if a text object is selected
Actual Behavior
returns false
Workaround
(selection.items[0] + "").startsWith("Text");
will return the correct value
@tp_up
did you try selection.items[0].constructor.name == "Text"
?
1 Like
tp_up
3
that works too.
i was using instanceof, because the start plugin example uses instanceof Rectangle
1 Like
Can you share how you were requiring Text
from the scenegraph?
tp_up
5
oh it seems like i forgot to do that. thanks!