<commit_before>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Calculates the height and orientation of the dropdown list, based on
// available screen space.
//------------------------------------------------------------------------------
d3plus.input.drop.height = function ( vars ) {

  var buttonHeight = vars.container.button.container().node().offsetHeight
    , position     = vars.container.value.node().getBoundingClientRect()

  vars.height.secondary = window.innerHeight - position.top
                        - buttonHeight - vars.ui.padding*2

  if ( vars.height.secondary < buttonHeight*3 ) {
    vars.height.secondary = position.top-10
    vars.self.open({"flipped": true})
  }
  else {
    vars.self.open({"flipped": false})
  }

  var scrolling = false
  if (vars.height.secondary > vars.height.max) {
    vars.height.secondary = vars.height.max
  }

}<commit_msg>fixed error with drop down auto-height<commit_after>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Calculates the height and orientation of the dropdown list, based on
// available screen space.
//------------------------------------------------------------------------------
d3plus.input.drop.height = function ( vars ) {

  var button = vars.container.button.container().node().getBoundingClientRect()

  vars.height.secondary = window.innerHeight - button.bottom - vars.ui.margin
                         - vars.ui.padding*2 - vars.ui.border*2

  if ( vars.height.secondary < button.height*3 ) {
    vars.height.secondary = button.top-10
    vars.self.open({"flipped": true})
  }
  else {
    vars.self.open({"flipped": false})
  }

  var scrolling = false
  if (vars.height.secondary > vars.height.max) {
    vars.height.secondary = vars.height.max
  }

}
{'fraction_non_alphanumeric': 0.2824048538334253, 'fraction_numerical': 0.006067291781577496, 'mean_word_length': 2.359259259259259, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, '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': '6599641', 'n_tokens_mistral': 511, 'n_tokens_neox': 497, 'n_words': 96}