<commit_before>class MainTabHandleHolder extends KDView
  
  constructor: (options = {}, data) ->

    options.bind = "mouseenter mouseleave"

    super options, data

  viewAppended:->

    mainView = @getDelegate()
    @addPlusHandle()

    mainView.mainTabView.on "PaneDidShow", (event)=> @_repositionPlusHandle event
    mainView.mainTabView.on "PaneRemoved", => @_repositionPlusHandle()

    @listenWindowResize()

  click:(event)->
    @_plusHandleClicked() if $(event.target).closest('.kdtabhandle').is('.plus')

  _windowDidResize:->
    mainView = @getDelegate()
    @setWidth mainView.mainTabView.getWidth()

  addPlusHandle:()->

    @addSubView @plusHandle = new KDCustomHTMLView
      cssClass : 'kdtabhandle add-editor-menu visible-tab-handle plus first last'
      partial  : "<span class='icon'></span><b class='hidden'>Click here to start</b>"
      delegate : @
      click    : (event) =>
        unless @plusHandle.$().hasClass('first')
          contextMenu = new JContextMenu
            event    : event
            delegate : @plusHandle
          ,
            'New Tab'              :
              callback             : (source, event)=>
                appManager.tell "StartTab", 'openFreshTab'
                contextMenu.destroy()<commit_msg>Set visibility of plusHandle when tab handle drag started.<commit_after>class MainTabHandleHolder extends KDView
  
  constructor: (options = {}, data) ->

    options.bind = "mouseenter mouseleave"

    super options, data

  viewAppended:->

    mainView = @getDelegate()
    @addPlusHandle()

    mainView.mainTabView.on "PaneDidShow", (event)=> @_repositionPlusHandle event
    mainView.mainTabView.on "PaneRemoved", => @_repositionPlusHandle()
    mainView.mainTabView.on "PaneAdded", (pane) =>
      tabHandle = pane.tabHandle
      tabHandle.on "DragInAction", =>
        @plusHandle.hide()
      tabHandle.on "DragFinished", =>
        @plusHandle.show()

    @listenWindowResize()

  click:(event)->
    @_plusHandleClicked() if $(event.target).closest('.kdtabhandle').is('.plus')

  _windowDidResize:->
    mainView = @getDelegate()
    @setWidth mainView.mainTabView.getWidth()

  addPlusHandle:()->

    @addSubView @plusHandle = new KDCustomHTMLView
      cssClass : 'kdtabhandle add-editor-menu visible-tab-handle plus first last'
      partial  : "<span class='icon'></span><b class='hidden'>Click here to start</b>"
      delegate : @
      click    : (event) =>
        unless @plusHandle.$().hasClass('first')
          contextMenu = new JContextMenu
            event    : event
            delegate : @plusHandle
          ,
            'New Tab'              :
              callback             : (source, event)=>
                appManager.tell "StartTab", 'openFreshTab'
                contextMenu.destroy()
{'fraction_non_alphanumeric': 0.12540078375489846, 'fraction_numerical': 0.0, 'mean_word_length': 2.609254498714653, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 32, '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': '7486358', 'n_tokens_mistral': 825, 'n_tokens_neox': 795, 'n_words': 168}