-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nolastan/sheets-api
Support color palettes
- Loading branch information
Showing
5 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var applyColors = function (newColors, docData) { | ||
var app = NSApplication.sharedApplication(); | ||
var appController = app.delegate(); | ||
var colors = []; | ||
for(var i=0; i<newColors.length; i++) { | ||
var color = MSColor.colorWithSVGString("#" + newColors[i].Rgb); | ||
color.alpha = newColors[i] .Opacity; | ||
colors.push(color); | ||
} | ||
colors = MSArray.dataArrayWithArray(colors); | ||
appController.globalAssets().setPrimitiveColors(colors); | ||
appController.globalAssets().objectDidChange(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
], | ||
}, | ||
"identifier" : "com.github.nolastan.sync", | ||
"version" : "1.0", | ||
"version" : "1.1", | ||
"description" : "Sync styles and symbols", | ||
"authorEmail" : "[email protected]", | ||
"name" : "Sync" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters