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" );
375375 Invokes the method of the same name from the parent widget, with any specified arguments. Essentially <code >.call()</code >.
376376 </desc >
377377 <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 >
379379 <code ><![CDATA[
380380_setOption: function( key, value ) {
381- this._super( key, value );
381+ if ( key === "width" ) {
382+ this.resize();
383+ } else {
384+ this._super( key, value );
385+ }
382386}
383387]]> </code >
384388 </example >
@@ -391,10 +395,14 @@ _setOption: function( key, value ) {
391395 <desc >Array of arguments to pass to the parent method.</desc >
392396 </argument >
393397 <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 >
395399 <code ><![CDATA[
396400_setOption: function( key, value ) {
397- this._superApply( arguments );
401+ if ( key === "width" ) {
402+ this.resize();
403+ } else {
404+ this._superApply( arguments );
405+ }
398406}
399407]]> </code >
400408 </example >
You can’t perform that action at this time.
0 commit comments