File tree 1 file changed +32
-25
lines changed
1 file changed +32
-25
lines changed Original file line number Diff line number Diff line change @@ -10,37 +10,44 @@ var ENOCLS = `Error in plugin "addAttributesToSVGElement": absent parameters.
10
10
It should have a list of "attributes" or one "attribute".
11
11
Config example:
12
12
13
- plugins:
14
- - addAttributesToSVGElement:
15
- attribute: "mySvg"
13
+ plugins: [
14
+ {
15
+ name: 'addAttributesToSVGElement',
16
+ params: {
17
+ attribute: "mySvg"
18
+ }
19
+ }
20
+ ]
16
21
17
- plugins:
18
- - addAttributesToSVGElement:
19
- attributes: ["mySvg", "size-big"]
22
+ plugins: [
23
+ {
24
+ name: 'addAttributesToSVGElement',
25
+ params: {
26
+ attributes: ["mySvg", "size-big"]
27
+ }
28
+ }
29
+ ]
20
30
21
- plugins:
22
- - addAttributesToSVGElement:
23
- attributes:
24
- - focusable: false
25
- - data-image: icon` ;
31
+ plugins: [
32
+ {
33
+ name: 'addAttributesToSVGElement',
34
+ params: {
35
+ attributes: [
36
+ {
37
+ focusable: false
38
+ },
39
+ {
40
+ 'data-image': icon
41
+ }
42
+ ]
43
+ }
44
+ }
45
+ ]
46
+ `
26
47
27
48
/**
28
49
* Add attributes to an outer <svg> element. Example config:
29
50
*
30
- * plugins:
31
- * - addAttributesToSVGElement:
32
- * attribute: 'data-icon'
33
- *
34
- * plugins:
35
- * - addAttributesToSVGElement:
36
- * attributes: ['data-icon', 'data-disabled']
37
- *
38
- * plugins:
39
- * - addAttributesToSVGElement:
40
- * attributes:
41
- * - focusable: false
42
- * - data-image: icon
43
- *
44
51
* @author April Arcus
45
52
*/
46
53
exports . fn = function ( data , params ) {
You can’t perform that action at this time.
0 commit comments