You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, symbols defined by a later mapping file override symbols defined in earlier mapping files. I think this behavior is reasonable and intuitive as a default, but #33 makes me wonder about alternative approaches for overlays/underlays. For example:
exportcombine=# add rectangle underlay to x/o symbolsx: <rectz-index="-10"fill="black"/>
o: <rectz-index="-10"fill="gray"/>
exportcombine=# add checkerboard underlay to all symbols-> <rectz-index="-10"fill={if@i+@j%2==0then"gray"else"black"}/>
To implement this, we could have a separate CombineMapping class, and Mappings would check allCombineMappings (and treat them like added <symbol>s at the end), but use the current behavior for regular Mappings. I wonder if the provided context should also specify the "main" <symbol> (in particular its width and height) for these mappings.
Alternatively, we could define combination to be the default behavior....
With #33 complete, we could combine two known mappings by wrapping them in an array. Perhaps we need an svgtiler.require to load the mapping defined by another file (.txt or .js or whatever) as a Mapping, and then someone wanting to combine could wrap them in an array. For example:
With the addition of svgtiler.require, combining two existing mapping files in sequence (as in command line) or parallel (as in this issue) is now easy:
Sequence: new Mappings(svgtiler.require(f1), svgtiler.require(f2))
Currently, symbols defined by a later mapping file override symbols defined in earlier mapping files. I think this behavior is reasonable and intuitive as a default, but #33 makes me wonder about alternative approaches for overlays/underlays. For example:
To implement this, we could have a separate
CombineMapping
class, andMappings
would check allCombineMapping
s (and treat them like added<symbol>
s at the end), but use the current behavior for regularMapping
s. I wonder if the providedcontext
should also specify the "main"<symbol>
(in particular itswidth
andheight
) for these mappings.Alternatively, we could define combination to be the default behavior....
With #33 complete, we could combine two known mappings by wrapping them in an array. Perhaps we need an
svgtiler.require
to load the mapping defined by another file (.txt
or.js
or whatever) as aMapping
, and then someone wanting to combine could wrap them in an array. For example:The text was updated successfully, but these errors were encountered: