• You could pass in the constants, if that is what you need?

    function drawTopLeftCorner(C, x, y) {
      g.setColor(C.color.primary.base);
    
    ....
    // then in a public method:
    drawTopLeftCorner(this,x,y)
    
About

Avatar for Gordon @Gordon started