Is there an easy way to select sublayers of a imported sketch file? right now I made a small function to do so:
find_in_sublayer = (parent, name) -> (parent.subLayers.filter (i) -> i.name is name)
I did this because sketch.plan.stats.x would give a error (undefined is not a object) but if I do find_in_sublayer(sketch.plan, 'stats').x = 100 it all works perfectly.
I just asked a similar question. Benjamin Den Boer gave a good answer:https://www.facebook.com/groups/framerjs/permalink/705487059578368/?comment_id=705831836210557&offset=0&total_comments=4&comment_tracking=%7B%22tn%22%3A%22R0%22%7D
Or just stats.x = 100?
I don't think that'll work. as far as I understand it you can't reference a sublayer with sketch.parent.layer Sadly, it would make things much easier. What you could do would be: sketch.plan.sublayer.x = 100
for anyone who comes across this issue. Rename the layers in sketch(if they have no unique names) and target them directly, so sketch.stats in this case
Benjamin, I use Sketch symbols across the artboards. Can I give unique names to symbols?