| 59 | def attr_src(self, value): self.attributes['src'] = str(value) |
| 60 | |
| 61 | def __init__(self, filename='', *args, **kwargs): |
| 62 | self.default_style.update(kwargs.get('style',{})) |
| 63 | kwargs['style'] = self.default_style |
| 64 | kwargs['width'] = kwargs['style'].get('width', kwargs.get('width','200px')) |
| 65 | kwargs['height'] = kwargs['style'].get('height', kwargs.get('height','180px')) |
| 66 | super(OpencvImage, self).__init__(filename, *args, **kwargs) |
| 67 | OpencvWidget._setup(self) |
| 68 | |
| 69 | def on_new_image_listener(self, emitter): |
| 70 | if emitter.img is None: |