apo
apo copied to clipboard
Enable max tokens in a place
Nice tool, lacks a maximum capacity of tokens per place though.
Literally my first time touching coffeescript and graphics in the browser, hope you can help me with two things.
- Couldn't get a setter to work:
I would have made a setter for the capacity in a place so the place can change its own radius when needed (and maybe label offset). The following didn't work:
setCap: (tokens) ->
@tokensCap = tokens
@radius = if tokens is 255 then 18 else 25
- The radius isn't immediately applied:
When changing the capacity, the radius is changed in the object, but the node isn't updated until I press F5.
Also I'm not sure what should be the default: Big enough to seem infinite? 1 for like, using the smallest and only explicitely use bigger capacities? 9999 for bigger infinity? Not sure how others use this tool.