apo icon indicating copy to clipboard operation
apo copied to clipboard

Enable max tokens in a place

Open Regenhardt opened this issue 4 years ago • 1 comments

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.

  1. 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
  1. 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.

Regenhardt avatar Jan 04 '22 18:01 Regenhardt

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.

Regenhardt avatar Jan 04 '22 18:01 Regenhardt