<commit_before>(function (_super) {

  /**
   * A base skeleton
   * @class
   * @augments hui.ui.Component
   * @param {Object} options
   */
  hui.ui.Skeleton = function(options) {
    this.nodes = {
      resizeNavigation : 'hui_skeleton_resize_navigation',
      resizeResults : 'hui_skeleton_resize_results',
      navigation : 'hui_skeleton_navigation',
      results : 'hui_skeleton_results',
      content : 'hui_skeleton_content',
      actions : 'hui_skeleton_actions'
    }
    _super.call(this, options);
    this._attach();
  }
  
  hui.ui.Skeleton.prototype = {
    _attach : function() {
      var initial = 0,
        navigation = this.nodes.navigation,
        results = this.nodes.results,
        content = this.nodes.content,
        actions = this.nodes.actions,
        navWidth, fullWidth, resultsWidth,
        self = this;

      hui.drag.register({
        element : this.nodes.resizeNavigation,
        onBeforeMove : function(e) {
          initial = e.getLeft();
          navWidth = navigation.clientWidth;
          resultsWidth = results.clientWidth;
          fullWidth = self.element.clientWidth;
        },
        onMove : function(e) {
          var diff = e.getLeft() - initial;
          navigation.style.width = ((navWidth + diff) / fullWidth * 100) + '%';
          results.style.left = ((navWidth + diff) / fullWidth * 100) + '%';
          content.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
          actions.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
        }
      })

      hui.drag.register({
        element : this.nodes.resizeResults,
        onBeforeMove : function(e) {
          initial = e.getLeft();
          navWidth = navigation.clientWidth;
          resultsWidth = results.clientWidth;
          fullWidth = self.element.clientWidth;
        },
        onMove : function(e) {
          var diff = e.getLeft() - initial;
          results.style.width = ((resultsWidth + diff) / fullWidth * 100) + '%';
          content.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
          actions.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
        }
      })
    },
    $$layout : function() {
      hui.log(this.element.clientWidth)
    }
  }

  hui.extend(hui.ui.Skeleton, _super);

})(hui.ui.Component);<commit_msg>Made layout follow content<commit_after>(function (_super) {

  /**
   * A base skeleton
   * @class
   * @augments hui.ui.Component
   * @param {Object} options
   */
  hui.ui.Skeleton = function(options) {
    this.nodes = {
      resizeNavigation : 'hui_skeleton_resize_navigation',
      resizeResults : 'hui_skeleton_resize_results',
      navigation : 'hui_skeleton_navigation',
      results : 'hui_skeleton_results',
      content : 'hui_skeleton_content',
      actions : 'hui_skeleton_actions'
    }
    _super.call(this, options);
    this._attach();
  }
  
  hui.ui.Skeleton.prototype = {
    _attach : function() {
      var initial = 0,
        navigation = this.nodes.navigation,
        results = this.nodes.results,
        content = this.nodes.content,
        actions = this.nodes.actions,
        navWidth, fullWidth, resultsWidth,
        self = this;

      hui.drag.register({
        element : this.nodes.resizeNavigation,
        onBeforeMove : function(e) {
          initial = e.getLeft();
          navWidth = navigation.clientWidth;
          resultsWidth = results.clientWidth;
          fullWidth = self.element.clientWidth;
        },
        onMove : function(e) {
          var diff = e.getLeft() - initial;
          navigation.style.width = ((navWidth + diff) / fullWidth * 100) + '%';
          results.style.left = ((navWidth + diff) / fullWidth * 100) + '%';
          content.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
          actions.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
        }
      })

      hui.drag.register({
        element : this.nodes.resizeResults,
        onBeforeMove : function(e) {
          initial = e.getLeft();
          navWidth = navigation.clientWidth;
          resultsWidth = results.clientWidth;
          fullWidth = self.element.clientWidth;
        },
        onMove : function(e) {
          var diff = e.getLeft() - initial;
          results.style.width = ((resultsWidth + diff) / fullWidth * 100) + '%';
          content.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
          actions.style.left = ((navWidth + resultsWidth + diff + 1) / fullWidth * 100) + '%';
        }
      })
    },
    $$layout : function() {
      var h = this.nodes.actions.clientHeight;
      this.nodes.content.style.top = h + 'px'
    }
  }

  hui.extend(hui.ui.Skeleton, _super);

})(hui.ui.Component);
{'fraction_non_alphanumeric': 0.13497942386831277, 'fraction_numerical': 0.010699588477366255, 'mean_word_length': 2.1771241830065358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2303610', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1423, 'n_words': 277}