Show More
@@ -37,7 +37,7 class BaseWidget(LoggingConfigurable): | |||
|
37 | 37 | |
|
38 | 38 | # Shared declarations (Class level) |
|
39 | 39 | _keys = List(Unicode, default_value = [], |
|
40 |
|
|
|
40 | help="List of keys comprising the state of the model.", allow_none=False) | |
|
41 | 41 | widget_construction_callback = None |
|
42 | 42 | |
|
43 | 43 | def on_widget_constructed(callback): |
@@ -198,7 +198,7 class BaseWidget(LoggingConfigurable): | |||
|
198 | 198 | A single property's name to sync with the frontend. |
|
199 | 199 | """ |
|
200 | 200 | self._send({"method": "update", |
|
201 |
|
|
|
201 | "state": self.get_state()}) | |
|
202 | 202 | |
|
203 | 203 | def get_state(self, key=None): |
|
204 | 204 | """Gets the widget state, or a piece of it. |
@@ -241,7 +241,7 class BaseWidget(LoggingConfigurable): | |||
|
241 | 241 | Content of the message to send. |
|
242 | 242 | """ |
|
243 | 243 | self._send({"method": "custom", |
|
244 |
|
|
|
244 | "custom_content": content}) | |
|
245 | 245 | |
|
246 | 246 | |
|
247 | 247 | def on_msg(self, callback, remove=False): |
@@ -423,8 +423,8 class Widget(BaseWidget): | |||
|
423 | 423 | be added to. |
|
424 | 424 | """ |
|
425 | 425 | self.send({"msg_type": "add_class", |
|
426 |
|
|
|
427 |
|
|
|
426 | "class_list": class_name, | |
|
427 | "selector": selector}) | |
|
428 | 428 | |
|
429 | 429 | |
|
430 | 430 | def remove_class(self, class_name, selector=""): |
@@ -440,8 +440,8 class Widget(BaseWidget): | |||
|
440 | 440 | be removed from. |
|
441 | 441 | """ |
|
442 | 442 | self.send({"msg_type": "remove_class", |
|
443 |
|
|
|
444 |
|
|
|
443 | "class_list": class_name, | |
|
444 | "selector": selector}) | |
|
445 | 445 | |
|
446 | 446 | |
|
447 | 447 | def view(self, view_name=None): |
General Comments 0
You need to be logged in to leave comments.
Login now