charlieroberts / interface.js

gui library for music / arts applications that works with touch, mouse and motion events
213 stars 45 forks source link

Add custom names for XY Panel dots #23

Closed jcfischer closed 7 years ago

jcfischer commented 7 years ago

By adding a childIds array to the initial options for the XY Panel, allow the dots to display custom ID strings.

Example:

var xy = new Interface.XY({
  childWidth: 50,
  numChildren: 6,
  childIds: ['A', 'B', 'C'], // the first three should display letters
  background:"#111",
  fill: "rgba(127,127,127,.2)",
  bounds:[0,0,.6,1],
});
charlieroberts commented 7 years ago

Looks great, and a nice idea! Thanks!

jcfischer commented 7 years ago

thanks :)