Class: Gliffynator::ObjectTimeline

Inherits:
Hash
  • Object
show all
Defined in:
lib/gliffynator/object_timeline.rb

Class Method Summary collapse

Class Method Details

.create(id, x, y, width = 140, height = 100, text = "") ⇒ Object



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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/gliffynator/object_timeline.rb', line 6

def self.create(id, x, y, width=140, height=100, text="")
  {
    x: x,
    y: y,
    rotation: 0,
    id: id,
    width: width,
    height: height,
    uid: "com.gliffy.shape.uml.uml_v1.default.object_timeline",
    order: id,
    lockAspectRatio: false,
    lockShape: false,
    constraints: {
      constraints: [
        {
          type: "HeightConstraint",
          HeightConstraint: {
            isMin: true,
            heightInfo: [
              {
                magnitude: 1,
                id: id+1
              }
            ],
            minHeight: 0,
            growParent: false,
            padding: 0
          }
        }
      ]
    },
    linkMap: [],
    children: [
      {
        x: 0,
        y: 0,
        rotation: 0,
        id: id+1,
        width: 140,
        height: 18,
        uid: nil,
        order: id+1,
        lockAspectRatio: false,
        lockShape: false,
        constraints: {
          constraints: [
            {
              type: "HeightConstraint",
              HeightConstraint: {
                isMin: false,
                heightInfo: [
                  {
                    magnitude: 1,
                    id: id+2
                  }
                ],
                minHeight: 0,
                growParent: true,
                padding: 0
              }
            }
          ]
        },
        graphic: {
          type: "Shape",
          Shape: {
            tid: "com.gliffy.stencil.rectangle.basic_v1",
            strokeWidth: 2,
            strokeColor: "#999999",
            fillColor: "#FFF2CC",
            gradient: false,
            dashStyle: nil,
            dropShadow: false,
            state: 0,
            opacity: 1.0,
            shadowX: 4.0,
            shadowY: 4.0
          }
        },
        children: [
          {
            x: 0,
            y: 0,
            rotation: 0,
            id: id+2,
            width: 140,
            height: 18,
            uid: nil,
            order: id+2,
            lockAspectRatio: false,
            lockShape: false,
            graphic: {
              type: "Text",
              Text: {
                overflow: "none",
                paddingTop: 2,
                paddingRight: 2,
                paddingBottom: 2,
                paddingLeft: 2,
                outerPaddingTop: 6,
                outerPaddingRight: 6,
                outerPaddingBottom: 2,
                outerPaddingLeft: 6,
                type: "fixed",
                lineTValue: nil,
                linePerpValue: nil,
                cardinalityType: nil,
                html: "<p style=\"text-align:center;\"><span style=\"font-weight:bold;text-decoration:underline;font-family:Arial;font-size:12px;\">"+text+"</span></p>",
                tid: nil,
                valign: "top",
                vposition: "none",
                hposition: "none"
              }
            },
            hidden: false,
            layerId: nil
          }
        ],
        hidden: false,
        layerId: nil
      },
      {
        x: 0,
        y: 18,
        rotation: 0,
        id: id+3,
        width: 140,
        height: 1282.0,
        uid: nil,
        order: id+3,
        lockAspectRatio: false,
        lockShape: false,
        constraints: {
          constraints: [
            {
              type: "HeightConstraint",
              HeightConstraint: {
                isMin: false,
                heightInfo: [
                  {
                    magnitude: 1,
                    id: id
                  },
                  {
                    magnitude: -1,
                    id: id+1
                  }
                ],
                minHeight: 0,
                growParent: false,
                padding: 0
              }
            },
            {
              type: "PositionConstraint",
              PositionConstraint: {
                nodeId: id+1,
                px: 0,
                py: 1.0,
                xOffset: 0,
                yOffset: 0
              }
            }
          ]
        },
        graphic: {
          type: "Shape",
          Shape: {
            tid: "com.gliffy.stencil.object_timeline.uml_v1",
            strokeWidth: 2.0,
            strokeColor: "#999999",
            fillColor: "#fff2cc",
            gradient: false,
            dashStyle: nil,
            dropShadow: false,
            state: 0,
            opacity: 1.0,
            shadowX: 4.0,
            shadowY: 4.0
          }
        },
        hidden: false,
        layerId: nil
      }
    ],
    hidden: false,
    layerId: "C3WysuhtocNA"
  }
end

.id_usageObject



2
3
4
# File 'lib/gliffynator/object_timeline.rb', line 2

def self.id_usage
  4
end