-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetLineDash.js
45 lines (45 loc) · 1007 Bytes
/
setLineDash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = {
name: "setLineDash",
ns: "canvas",
async: true,
title: "Set Line Dash",
description: "Set Line Dash",
phrases: {
active: "Setting line dash"
},
ports: {
input: {
context: {
title: "Context",
type: "CanvasRenderingContext2D",
required: true
},
segment: {
title: "Segment",
description: "An even number of non-negative numbers specifying a dash list.",
type: "array",
async: true,
required: true,
fn: function __SEGMENT__(data, source, state, input, $, output) {
var r = function() {
$.context.setLineDash($.segment);
output({
context: $.get('context')
});
}.call(this);
return {
state: state,
return: r
};
}
}
},
output: {
context: {
title: "Context",
type: "CanvasRenderingContext2D"
}
}
},
state: {}
}