Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

add arrays of functions to spec #85

Closed
ansis opened this issue Jul 9, 2014 · 3 comments
Closed

add arrays of functions to spec #85

ansis opened this issue Jul 9, 2014 · 3 comments
Milestone

Comments

@ansis
Copy link
Contributor

ansis commented Jul 9, 2014

These properties need to support functions. I'm not sure how arrays for functions should be specified in the spec.

  • {fill,line,text,icon}-translate
  • line-dasharray
  • raster-brightness
@lbud
Copy link
Contributor

lbud commented Jul 9, 2014

I've been working on getting the validate script to pass and this validates fine, but does it make sense/look alright in the spec?:

    "line-dasharray": {
      "type": "array",
      "value": ["number", "function"],
      "length": 2,
      "default": [
        1,
        -1
      ],
      "function": true,
      "transition": true
    },

whereas before it had "value": "number",

Is it fine for value to support an array of possible values, or does that break things elsewhere?
(The other option I had been playing with was adding an option in fn for an array of functions, but I hadn't gotten that to work and it also seems too specific a case to allow any fn definition to accept an array of fns)

@kkaefer
Copy link
Member

kkaefer commented Jul 10, 2014

They already support functions on native.

@kkaefer kkaefer mentioned this issue Jul 15, 2014
@jfirebaugh
Copy link
Contributor

Add in #86.

@jfirebaugh jfirebaugh added this to the v4 milestone Jul 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants