Tab.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-layout-component-Tab'>/**
  19. </span> * Component layout for tabs
  20. * @private
  21. */
  22. Ext.define('Ext.layout.component.Tab', {
  23. extend: 'Ext.layout.component.Button',
  24. alias: 'layout.tab',
  25. beginLayout: function(ownerContext) {
  26. var me = this,
  27. closable = me.owner.closable;
  28. // Changing the close button visibility causes our cached measurements to be wrong,
  29. // so we must convince our base class to re-cache those adjustments...
  30. if (me.lastClosable !== closable) {
  31. me.lastClosable = closable;
  32. me.clearTargetCache();
  33. }
  34. me.callParent(arguments);
  35. }
  36. });
  37. </pre>
  38. </body>
  39. </html>