Skip to content

Instantly share code, notes, and snippets.

@philippeback
Created August 26, 2014 09:00
Show Gist options
  • Save philippeback/cc78c174e079b9780a0c to your computer and use it in GitHub Desktop.
Save philippeback/cc78c174e079b9780a0c to your computer and use it in GitHub Desktop.
SVG and passengers
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