Created
January 10, 2016 09:30
-
-
Save fupslot/213dbb4bc8d44f7b2d76 to your computer and use it in GitHub Desktop.
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
function getInset(rectA, rectB) { | |
return { | |
top: (rectB.top - rectB.top), | |
right: (rectA.left + rectA.width) - (rectB.left + rectB.width), | |
bottom: (rectA.top + rectA.height) - (rectB.top + rectB.height), | |
left: rectB.left - rectB.left | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment