Skip to content

Instantly share code, notes, and snippets.

@abhoopathy
Created November 2, 2015 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhoopathy/876fab26c8f9b99ea8be to your computer and use it in GitHub Desktop.
Save abhoopathy/876fab26c8f9b99ea8be to your computer and use it in GitHub Desktop.
// Duplicate Artboard Below (alt ↓)
current_selection = selection[0];
if (current_selection.className() == "MSArtboardGroup") {
var parent = current_selection;
} else {
var parent = [current_selection parentGroup];
}
var artboard_copy = [parent duplicate];
[[artboard_copy frame] addY:[[parent frame] height] + 100]
[artboard_copy select:true byExpandingSelection:false]
// Duplicate Artboard Right (alt →)
current_selection = selection[0];
if (current_selection.className() == "MSArtboardGroup") {
var parent = current_selection;
} else {
var parent = [current_selection parentGroup];
}
var artboard_copy = [parent duplicate];
[[artboard_copy frame] addX:[[parent frame] width] + 100]
[artboard_copy select:true byExpandingSelection:false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment