(self, **config)
| 93 | ] |
| 94 | |
| 95 | def __init__(self, **config): |
| 96 | _SimpleLayoutBase.__init__(self, **config) |
| 97 | self.add_defaults(Spiral.defaults) |
| 98 | self.dirty = True # need to recalculate |
| 99 | self.layout_info = [] |
| 100 | self.last_size = None |
| 101 | self.last_screen = None |
| 102 | self.initial_ratio = self.ratio |
| 103 | self.initial_main_pane_ratio = self.main_pane_ratio |
| 104 | self.main_pane = self.main_pane.lower() |
| 105 | if self.main_pane not in ["top", "left", "bottom", "right"]: |
| 106 | logger.warning( |
| 107 | "Unknown main_pane location: %s. Defaulting to 'left'.", self.main_pane |
| 108 | ) |
| 109 | self.main_pane = "left" |
| 110 | |
| 111 | # Calculate the order of transformations required based on position of main pane |
| 112 | # and rotation direction |
| 113 | # Lists are longer so we can pick any side and have the next 4 transformations |
| 114 | if self.clockwise: |
| 115 | order = ["left", "top", "right", "bottom", "left", "top", "right"] |
| 116 | else: |
| 117 | order = ["left", "bottom", "right", "top", "left", "bottom", "right"] |
| 118 | |
| 119 | idx = order.index(self.main_pane) |
| 120 | self.splits = order[idx : idx + 4] |
| 121 | |
| 122 | def clone(self, group: _Group) -> Self: |
| 123 | return _SimpleLayoutBase.clone(self, group) |
nothing calls this directly
no test coverage detected