Created
February 4, 2020 09:19
-
-
Save danhollick/862207e91eac3e5edeba324d0a8b6b3e to your computer and use it in GitHub Desktop.
clean up listeners
This file contains hidden or 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
figma.on('selectionchange', () => { | |
if (figma.currentPage.selection.length > 1) { | |
// assigning values from selection | |
calculateAndSendContrast(foregroundColor, foregroundAlpha, backgoundColor) | |
} | |
}) | |
figma.ui.onmessage = msg => { | |
if (msg.type === 'swap') { | |
// swapping variable values | |
calculateAndSendContrast(foregroundColor, foregroundAlpha, backgoundColor) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment