@@ -29,36 +29,25 @@ define([
2929 // _TemplatedMixin will create our dom node using this HTML template.
3030 templateString : widgetTemplate ,
3131
32- // Parameters configured in the Modeler.
33- mfToExecute : "" ,
34- messageString : "" ,
35- backgroundColor : "" ,
36-
37- // Internal variables. Non-primitives created in the prototype are shared between all widget instances.
3832 _handles : null ,
3933 _contextObj : null ,
40- _alertDiv : null ,
4134
42- // dojo.declare.constructor is called to construct the widget instance. Implement to initialize non-primitive properties.
4335 constructor : function ( ) {
4436 this . _handles = [ ] ;
4537 } ,
4638
47- // dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
4839 postCreate : function ( ) {
4940 console . log ( this . id + ".postCreate" ) ;
50- this . _updateRendering ( function ( ) { } ) ;
41+ this . _updateRendering ( ) ;
5142 } ,
5243
53- // mxui.widget._WidgetBase.update is called when context is changed or initialized. Implement to re-render and / or fetch data.
5444 update : function ( obj , callback ) {
5545 console . log ( this . id + ".update" ) ;
5646 this . _contextObj = obj ;
5747 this . _resetSubscriptions ( ) ;
5848 this . _updateRendering ( callback ) ;
5949 } ,
6050
61- // mxui.widget._WidgetBase.update is called when context is changed or initialized. Implement to re-render and / or fetch data.
6251 applyContext : function ( context , callback ) {
6352 console . log ( this . id + ".applyContext" ) ;
6453 this . _contextContext = context ;
@@ -79,28 +68,16 @@ define([
7968 }
8069 } ,
8170
82- // mxui.widget._WidgetBase.enable is called when the widget should enable editing. Implement to enable editing if widget is input widget.
83- enable : function ( ) { } ,
84-
85- // mxui.widget._WidgetBase.enable is called when the widget should disable editing. Implement to disable editing if widget is input widget.
86- disable : function ( ) { } ,
87-
88- // mxui.widget._WidgetBase.resize is called when the page"s layout is recalculated. Implement to do sizing calculations. Prefer using CSS instead.
89- resize : function ( box ) { } ,
90-
91- // mxui.widget._WidgetBase.uninitialize is called when the widget is destroyed. Implement to do special tear-down work.
92- uninitialize : function ( ) {
93- // Clean up listeners, helper objects, etc. There is no need to remove listeners added with this.connect / this.subscribe / this.own.
94- } ,
95-
9671 // Rerender the interface.
9772 _updateRendering : function ( callback ) {
9873 if ( this . imageurl !== '' ) {
9974 this . imageNode . src = this . imageurl ;
10075 } else {
10176 this . imageNode . src = this . defaultImage ;
10277 }
103- callback ( ) ;
78+
79+ if ( callback )
80+ callback ( ) ;
10481 } ,
10582
10683 // Reset subscriptions.
0 commit comments