Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Remove page expandBy
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegowen committed Apr 30, 2015
1 parent ae170e8 commit 8521446
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Upload to CloudApp.sketchplugin
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,19 @@
// Copyright (c) 2015 Mike Gowen, Delighted Inc.

var currentPage = [doc currentPage]
var currentPageBounds = [currentPage contentBounds]
var currentArtboard = [[doc currentPage] currentArtboard]

var PAGE_EXPAND_WIDTH = 50

if ([selection count] == 0) {
[currentPageBounds expandBy:PAGE_EXPAND_WIDTH]
saveFileAndSendToCloudApp(currentPage)
} else if ([selection count] == 1) {
if (currentArtboard) {
saveFileAndSendToCloudApp(currentArtboard)
} else {
[currentPageBounds expandBy:PAGE_EXPAND_WIDTH]
saveFileAndSendToCloudApp(currentPage)
}
} else {
var uniqueArtboards = getUniqueArtboards(selection)
if ([uniqueArtboards count] == 0) {
[currentPageBounds expandBy:PAGE_EXPAND_WIDTH]
saveFileAndSendToCloudApp(currentPage)
} else if ([uniqueArtboards count] == 1) {
saveFileAndSendToCloudApp(currentArtboard)
Expand Down

0 comments on commit 8521446

Please sign in to comment.