| 362 | e.prepare_html(view) |
| 363 | |
| 364 | def build_html(self, view, path, **kwargs): |
| 365 | # Gets current context. |
| 366 | context = view.context |
| 367 | b = context.b |
| 368 | |
| 369 | # Use self.cssClass if defined, otherwise self class. #id is ignored if None |
| 370 | b.div(cssClass=self.cssClass or self.__class__.__name__.lower(), cssId=self.cssId) |
| 371 | |
| 372 | b.img(src=self.path, alt=self.alt) |
| 373 | |
| 374 | # Allow CSS to address the captions separately. |
| 375 | b.div(cssClass='caption') |
| 376 | |
| 377 | # Draw captions if there are any. |
| 378 | for e in self.elements: |
| 379 | e.build_html(view, path, **kwargs) |
| 380 | # .caption |
| 381 | b._div() |
| 382 | |
| 383 | # self.cssClass or self.__class__.__name__ |
| 384 | b._div() |
| 385 | |
| 386 | def build_(self, view, origin=ORIGIN): |
| 387 | print('pbimage.build_flat') |