Lines Matching refs:s
231 _.each(signals, function(s) { argument
236 var bb = this.textBBox(s.message, font);
239 s.textBB = bb;
240 s.width = bb.width;
241 s.height = bb.height;
245 if (s.type == 'Signal') {
247 s.width += (SIGNAL_MARGIN + SIGNAL_PADDING) * 2;
248 s.height += (SIGNAL_MARGIN + SIGNAL_PADDING) * 2;
250 if (s.isSelf()) {
252 a = s.actorA.index;
254 s.width += SELF_SIGNAL_WIDTH;
256 a = Math.min(s.actorA.index, s.actorB.index);
257 b = Math.max(s.actorA.index, s.actorB.index);
260 } else if (s.type == 'Note') {
261 s.width += (NOTE_MARGIN + NOTE_PADDING) * 2;
262 s.height += (NOTE_MARGIN + NOTE_PADDING) * 2;
267 if (s.placement == PLACEMENT.LEFTOF) {
268 b = s.actor.index;
270 } else if (s.placement == PLACEMENT.RIGHTOF) {
271 a = s.actor.index;
273 } else if (s.placement == PLACEMENT.OVER && s.hasManyActors()) {
275 a = Math.min(s.actor[0].index, s.actor[1].index);
276 b = Math.max(s.actor[0].index, s.actor[1].index);
281 } else if (s.placement == PLACEMENT.OVER) {
283 a = s.actor.index;
284 actorEnsureDistance(a - 1, a, s.width / 2);
285 actorEnsureDistance(a, a + 1, s.width / 2);
286 this.signalsHeight_ += s.height;
291 throw new Error('Unhandled signal type:' + s.type);
294 actorEnsureDistance(a, b, s.width + extraWidth);
295 this.signalsHeight_ += s.height;
364 _.each(this.diagram.signals, function(s) { argument
366 if (s.type == 'Signal') {
367 if (s.isSelf()) {
368 this.drawSelfSignal(s, y);
370 this.drawSignal(s, y);
373 } else if (s.type == 'Note') {
374 this.drawNote(s, y);
377 y += s.height;