Skip to content

Instantly share code, notes, and snippets.

@janily
Created June 16, 2020 00:40
Show Gist options
  • Select an option

  • Save janily/33f26758fb05f2feb5c992a95d4104f4 to your computer and use it in GitHub Desktop.

Select an option

Save janily/33f26758fb05f2feb5c992a95d4104f4 to your computer and use it in GitHub Desktop.
get selection position
var selectedLayers = context.selection;
for (var i = 0, n = selectedLayers.count(); i < n; i++) {
var layer = selectedLayers[i];
console.log(layer.frame().x());
console.log(layer.frame().y());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment