File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -375,10 +375,14 @@ this._off( this.element, "click" );
375
375
Invokes the method of the same name from the parent widget, with any specified arguments. Essentially <code >.call()</code >.
376
376
</desc >
377
377
<example >
378
- <desc >Call the parent widget's <code >_setOption()</code > method.</desc >
378
+ <desc >Handle the width option and call the parent widget's <code >_setOption()</code > method to handle all other options .</desc >
379
379
<code ><![CDATA[
380
380
_setOption: function( key, value ) {
381
- this._super( key, value );
381
+ if ( key === "width" ) {
382
+ this.resize();
383
+ } else {
384
+ this._super( key, value );
385
+ }
382
386
}
383
387
]]> </code >
384
388
</example >
@@ -391,10 +395,14 @@ _setOption: function( key, value ) {
391
395
<desc >Array of arguments to pass to the parent method.</desc >
392
396
</argument >
393
397
<example >
394
- <desc >Call the parent widget's <code >_setOption()</code > method.</desc >
398
+ <desc >Handle the width option and call the parent widget's <code >_setOption()</code > method to handle all other options .</desc >
395
399
<code ><![CDATA[
396
400
_setOption: function( key, value ) {
397
- this._superApply( arguments );
401
+ if ( key === "width" ) {
402
+ this.resize();
403
+ } else {
404
+ this._superApply( arguments );
405
+ }
398
406
}
399
407
]]> </code >
400
408
</example >
You can’t perform that action at this time.
0 commit comments