| 234 | self.onmousedown.do(self.start_drag) |
| 235 | |
| 236 | def setup(self, refWidget, newParent): |
| 237 | self.style['display'] = 'none' |
| 238 | if issubclass(newParent.__class__, gui.TabBox): |
| 239 | return |
| 240 | if issubclass(refWidget.__class__, gui.Widget) and 'left' in refWidget.style and 'top' in refWidget.style and \ |
| 241 | 'width' in refWidget.style and 'height' in refWidget.style and refWidget.css_position=='absolute': |
| 242 | DraggableItem.setup(self, refWidget, newParent) |
| 243 | self.style['display'] = 'block' |
| 244 | |
| 245 | def on_drag(self, emitter, x, y): |
| 246 | if self.active: |