Commit 0757c52b authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] Fix typos

parent c8d0ed60
......@@ -62,6 +62,7 @@ from __future__ import unicode_literals
from __future__ import print_function
from math import sqrt
from collections import defaultdict
import itertools as it
from antlr3 import ANTLRStringStream, ANTLRFileStream, CommonTokenStream
from condexpLexer import condexpLexer
......@@ -1663,10 +1664,8 @@ class CMacroNode(CSimpleNode):
"""
Look for transitions pointed by mouse
No recursive search - transitions are in current node
"""
for gtr in self.transitions:
for trans in gtr:
for trans in it.chain(*self.transitions):
if trans.is_me(mox, moy, dstyle, w_coef, h_coef):
return trans
......@@ -1939,8 +1938,7 @@ class CTopNode(CMacroNode):
ccy = ccc[1] / h_coef
return (nnn, hhh, (ccx, ccy), ttt)
# no subnode found: try to find a transition at top level
for trg in self.transitions:
for trans in trg:
for trans in it.chain(*self.transitions):
if trans.is_me(mox, moy, dstyle, w_coef, h_coef):
ccx = 0.5 / w_coef
ccy = 0.5 / h_coef
......@@ -2070,9 +2068,11 @@ class CTransition(object):
return set()
def is_me(self, mox, moy, dstyle, w_coef, h_coef):
"""
Tell if mouse position is closed to transition
@param mox, moy: mouse coordinates in container coord (local coordinates)
"""Tell if mouse position is closed to transition
:param mox, moy: mouse coordinates in container coord (local coordinates)
:return: True or False
:rtype: <boolean>
"""
v_size = self.accept(dstyle)
dist_max = max(v_size[0], v_size[1])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment