Show More
@@ -140,25 +140,23 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
140 | 140 | |
|
141 | 141 | def open_subsection(self): |
|
142 | 142 | self.subsection_open = True |
|
143 | #print('open subsection') | |
|
144 | 143 | return True |
|
145 | 144 | |
|
146 | 145 | def open_section(self): |
|
147 | 146 | self.section_open = True |
|
148 | #print('open section') | |
|
149 | 147 | return True |
|
150 | 148 | |
|
151 | 149 | def open_fragment(self): |
|
152 | 150 | self.fragment_open = True |
|
153 | #print('open fragment') | |
|
154 | 151 | return True |
|
155 | 152 | |
|
153 | # could probaly write those maybe_close/open | |
|
154 | # with a function functor | |
|
156 | 155 | def maybe_close_section(self): |
|
157 | 156 | """return True is already open, false otherwise |
|
158 | 157 | and change state to close |
|
159 | 158 | """ |
|
160 | 159 | if self.section_open : |
|
161 | #print('close section') | |
|
162 | 160 | self.section_open = False |
|
163 | 161 | return True |
|
164 | 162 | else : |
@@ -170,7 +168,6 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
170 | 168 | """ |
|
171 | 169 | if not self.section_open : |
|
172 | 170 | self.section_open = True |
|
173 | #print('open section (m)') | |
|
174 | 171 | return True |
|
175 | 172 | else : |
|
176 | 173 | return False |
@@ -180,7 +177,6 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
180 | 177 | and change state to close |
|
181 | 178 | """ |
|
182 | 179 | if not self.subsection_open : |
|
183 | #print('open subsection (m)') | |
|
184 | 180 | self.subsection_open = True |
|
185 | 181 | return True |
|
186 | 182 | else : |
@@ -191,7 +187,6 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
191 | 187 | and change state to close |
|
192 | 188 | """ |
|
193 | 189 | if self.subsection_open : |
|
194 | #print('close subsection (m)') | |
|
195 | 190 | self.subsection_open = False |
|
196 | 191 | return True |
|
197 | 192 | else : |
@@ -203,7 +198,6 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
203 | 198 | """ |
|
204 | 199 | if self.fragment_open : |
|
205 | 200 | self.fragment_open = False |
|
206 | #print('close fragment (m)') | |
|
207 | 201 | return True |
|
208 | 202 | else : |
|
209 | 203 | return False |
@@ -213,11 +207,11 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
213 | 207 | if ctype is None : |
|
214 | 208 | cell.metadata.slideshow = {} |
|
215 | 209 | cell.metadata.slideshow['slide_type'] = None |
|
216 | if ctype == 'fragment': | |
|
210 | elif ctype == 'fragment': | |
|
217 | 211 | cell.metadata.slideshow.close_fragment = self.maybe_close_fragment() |
|
218 | 212 | cell.metadata.slideshow.close_subsection = False |
|
219 | 213 | cell.metadata.slideshow.close_section = False |
|
220 | ||
|
214 | ||
|
221 | 215 | cell.metadata.slideshow.open_section = self.maybe_open_section() |
|
222 | 216 | cell.metadata.slideshow.open_subsection = self.maybe_open_subsection() |
|
223 | 217 | cell.metadata.slideshow.open_fragment = self.open_fragment() |
@@ -226,7 +220,7 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
226 | 220 | cell.metadata.slideshow.close_fragment = self.maybe_close_fragment() |
|
227 | 221 | cell.metadata.slideshow.close_subsection = self.maybe_close_subsection() |
|
228 | 222 | cell.metadata.slideshow.close_section = False |
|
229 | ||
|
223 | ||
|
230 | 224 | cell.metadata.slideshow.open_section = self.maybe_open_section() |
|
231 | 225 | cell.metadata.slideshow.open_subsection = self.open_subsection() |
|
232 | 226 | cell.metadata.slideshow.open_fragment = False |
@@ -234,7 +228,7 b' class RevealHelpTransformer(ConfigurableTransformers):' | |||
|
234 | 228 | cell.metadata.slideshow.close_fragment = self.maybe_close_fragment() |
|
235 | 229 | cell.metadata.slideshow.close_subsection = self.maybe_close_subsection() |
|
236 | 230 | cell.metadata.slideshow.close_section = self.maybe_close_section() |
|
237 | ||
|
231 | ||
|
238 | 232 | cell.metadata.slideshow.open_section = self.open_section() |
|
239 | 233 | cell.metadata.slideshow.open_subsection = self.open_subsection() |
|
240 | 234 | cell.metadata.slideshow.open_fragment = False |
General Comments 0
You need to be logged in to leave comments.
Login now