Skip to content

Instantly share code, notes, and snippets.

@LukeFinch
Created August 19, 2020 14:27
Show Gist options
  • Save LukeFinch/cd4ceb491be3a39e72ba08db6c0f3ce1 to your computer and use it in GitHub Desktop.
Save LukeFinch/cd4ceb491be3a39e72ba08db6c0f3ce1 to your computer and use it in GitHub Desktop.
let sel = context.selection
sel.forEach(layer => {
layer.frame = layer.parentArtboard().frame()
if(layer.class() == 'MSTextLayer'){
let txt = layer.stringValue()
layer.stringValue = 'T'
layer.frame().y = layer.frame().y() - (layer.pathInFrame().bounds().origin.y - layer.frame().y())
layer.stringValue = txt
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment