forked from ~ulysseskao/xdashangular

Dennis Kao
2016-04-25 ce0f5117e5830ade396e88594accf66c20200c81
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*! JointJS v0.9.7 - JavaScript diagramming library  2016-04-20 
 
 
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
joint.shapes.fsa = {};
 
joint.shapes.fsa.State = joint.shapes.basic.Circle.extend({
    defaults: joint.util.deepSupplement({
        type: 'fsa.State',
        attrs: {
            circle: { 'stroke-width': 3 },
            text: { 'font-weight': '800' }
        }
    }, joint.shapes.basic.Circle.prototype.defaults)
});
 
joint.shapes.fsa.StartState = joint.dia.Element.extend({
 
    markup: '<g class="rotatable"><g class="scalable"><circle/></g></g>',
 
    defaults: joint.util.deepSupplement({
 
        type: 'fsa.StartState',
        size: { width: 20, height: 20 },
        attrs: {
            circle: {
                transform: 'translate(10, 10)',
                r: 10,
                fill: '#000000'
            }
        }
 
    }, joint.dia.Element.prototype.defaults)
});
 
joint.shapes.fsa.EndState = joint.dia.Element.extend({
 
    markup: '<g class="rotatable"><g class="scalable"><circle class="outer"/><circle class="inner"/></g></g>',
 
    defaults: joint.util.deepSupplement({
 
        type: 'fsa.EndState',
        size: { width: 20, height: 20 },
        attrs: {
            '.outer': {
                transform: 'translate(10, 10)',
                r: 10,
                fill: '#ffffff',
                stroke: '#000000'
            },
 
            '.inner': {
                transform: 'translate(10, 10)',
                r: 6,
                fill: '#000000'
            }
        }
 
    }, joint.dia.Element.prototype.defaults)
});
 
joint.shapes.fsa.Arrow = joint.dia.Link.extend({
 
    defaults: joint.util.deepSupplement({
        type: 'fsa.Arrow',
        attrs: { '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z' }},
        smooth: true
    }, joint.dia.Link.prototype.defaults)
});