Last active
December 19, 2025 21:53
-
-
Save indus/b5cf76bf24130a5723a63aae9cde0b35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default function(api) { | |
| var options = [{ | |
| name: 'string', | |
| DEFAULT: true | |
| }]; | |
| var cmd = { | |
| name: 'set-baz', | |
| options, | |
| command: run, | |
| target: 'layer' | |
| }; | |
| return cmd; | |
| // modifies layer in place | |
| function run(lyr, dataset, opts) { | |
| lyr.data.getRecords().forEach(function(d) { | |
| d.baz = opts.string || ''; | |
| }); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment