1+ class PosScaleAdjust :
2+
3+ def __init__ (self , my_op ) -> None :
4+ self .Owner_op = my_op
5+ self .Updating_op = False
6+
7+
8+ def Parse_par_change (self , par :callable ) -> None :
9+
10+ try :
11+ func = getattr (self .Owner_op , par .name )
12+ func (par )
13+
14+ except Exception as e :
15+ print (e )
16+ pass
17+
18+ @property
19+ def _get_target (self ) -> callable :
20+ return self .Owner_op .par .Targetop .eval ()
21+
22+ def Targetop (self , par :callable ) -> None :
23+ self .Updating_op = True
24+ print (par .eval ())
25+ if par .eval () != None :
26+
27+ self .Owner_op .par .Sizew = par .eval ().nodeWidth
28+ self .Owner_op .par .Sizeh = par .eval ().nodeHeight
29+ self .Owner_op .par .Networkpositionx = par .eval ().nodeX
30+ self .Owner_op .par .Networkpositiony = par .eval ().nodeY
31+ self .Owner_op .par .Title = par .eval ().par .Titletext .eval ()
32+
33+ else :
34+ self .Owner_op .par .Sizew = 0
35+ self .Owner_op .par .Sizeh = 0
36+ self .Owner_op .par .Networkpositionx = 0
37+ self .Owner_op .par .Networkpositiony = 0
38+ self .Owner_op .par .Title = ''
39+
40+ self .Updating_op = False
41+
42+
43+ def Sizew (self , par :callable ) -> None :
44+ if self .Updating_op :
45+ pass
46+ else :
47+ self ._get_target .nodeWidth = par .eval ()
48+
49+ def Sizeh (self , par :callable ) -> None :
50+ if self .Updating_op :
51+ pass
52+ else :
53+ self ._get_target .nodeHeight = par .eval ()
54+
55+ def Networkpositionx (self , par :callable ) -> None :
56+ if self .Updating_op :
57+ pass
58+ else :
59+ self ._get_target .nodeX = par .eval ()
60+
61+ def Networkpositiony (self , par :callable ) -> None :
62+ if self .Updating_op :
63+ pass
64+ else :
65+ self ._get_target .nodeY = par .eval ()
0 commit comments