Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Layer::makeTriangle = (direction)->
  2. this.borderColor = "transparent"
  3. this.borderWidth = this.width / 2
  4. this.style["border-#{direction}-color"] = this.backgroundColor.toHexString()
  5. this.backgroundColor = "transparent"
  6.  
  7. # ----------
  8.  
  9. rect = new Layer
  10. size: 20
  11. backgroundColor: "black"
  12. point: Align.center
  13.  
  14. rect.makeTriangle "bottom"
  15.  
  16. # Directions: "top", "right", "bottom", "left"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement