Created
August 26, 2014 09:00
-
-
Save philippeback/cc78c174e079b9780a0c to your computer and use it in GitHub Desktop.
SVG and passengers
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
drawSVGPokeOn: svg | |
| passenger | | |
svg anchor | |
passenger: 'YOP'; | |
onClick: ((svg jQuery ajax) | |
callback: [ :passengers | passenger := passengers first. self info: ('Poked!', passenger) ] passengers: (svg jQuery this); | |
script: [ :s | s << ('alert("Hello ', passenger, '")') js]); | |
with: [ | |
svg circle | |
stroke: Color black; | |
strokeWidth: 3 ; | |
fill: Color yellow; | |
fillOpacity: 0.8 ; | |
opacity: 0.6; | |
center: 50@50; | |
radius: 30 | |
]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment