Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtk75 committed Apr 1, 2015
1 parent a067d0c commit 1d24b94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/js/SequenceDiagramBuilder.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ SequenceDiagramBuilder::reply = (a, b)->
ref = core._to_ref core._to_id b
obj = @_diagram[ref] if @_diagram[ref]

f = (occur, n)-> if occur.is_on_another() then f(occur._parent_occurr(), n + 1) else n
f = (occur, n)-> if occur.is_self() then f(occur._parent_occurr(), n + 1) else n
n = f @_curr_occurr(), 0
@_curr_occurr()
.parents(".interaction:eq(#{n})").data("_self")
Expand Down
3 changes: 3 additions & 0 deletions lib/js/SequenceOccurrence.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ SequenceOccurrence::_move_horizontally = ->
SequenceOccurrence::is_on_another =->
not (@_parent_occurr() is null)

SequenceOccurrence::is_self = ->
@parents(".interaction:eq(0)").hasClass("self")

SequenceOccurrence::_parent_occurr = ->
occurrs = @parents ".occurrence"
return null if occurrs.length is 0
Expand Down

0 comments on commit 1d24b94

Please sign in to comment.