<commit_before>#= require 'overlays/images_container'
#= require 'overlays/draggable_image'

class OverlayMe.Overlays.Image extends Backbone.View

  tagName: 'article'
  className: 'overlay-image-block image media'

  template: '
    <% if(destroyable) { %>
      <div class="media__action">
        <span class="del-button image__destroy" title="Delete">x</span>
      </div>
    <% } %>
    <div class="media__img">
      <img src="<%= url %>" height=50 width=50 alt="<%= name %>">
    </div>
    <div class="media__body">
      <input class="image__toggle" type="checkbox" checked="<%= checked %>">
      <div class="image__name"><%= name %></div>
      <input type="range" class="image__opacity-controller" value="<%= opacity %>">
    </div>
  '

  initialize: (src, options) ->
    $o.extend { destroyable: false }, options

    @$el = $o(@el)

    @src = src
    @id  = OverlayMe.Overlays.urlToId @src
    @$el.attr 'data-img-id', @id

    imagesContainer = new OverlayMe.Overlays.ImagesContainer({ parent_path: options.parent_path })

    @css = $o.extend {display: 'none', opacity: 0.5}, options.css

    unless $o(imagesContainer.el).find("##{@id}").length
      $o(imagesContainer.el).append @image()<commit_msg>Remove fixd height for images in menu<commit_after>#= require 'overlays/images_container'
#= require 'overlays/draggable_image'

class OverlayMe.Overlays.Image extends Backbone.View

  tagName: 'article'
  className: 'overlay-image-block image media'

  template: '
    <% if(destroyable) { %>
      <div class="media__action">
        <span class="del-button image__destroy" title="Delete">x</span>
      </div>
    <% } %>
    <div class="media__img">
      <img src="<%= url %>" width=50 alt="<%= name %>">
    </div>
    <div class="media__body">
      <input class="image__toggle" type="checkbox" checked="<%= checked %>">
      <div class="image__name"><%= name %></div>
      <input type="range" class="image__opacity-controller" value="<%= opacity %>">
    </div>
  '

  initialize: (src, options) ->
    $o.extend { destroyable: false }, options

    @$el = $o(@el)

    @src = src
    @id  = OverlayMe.Overlays.urlToId @src
    @$el.attr 'data-img-id', @id

    imagesContainer = new OverlayMe.Overlays.ImagesContainer({ parent_path: options.parent_path })

    @css = $o.extend {display: 'none', opacity: 0.5}, options.css

    unless $o(imagesContainer.el).find("##{@id}").length
      $o(imagesContainer.el).append @image()
{'fraction_non_alphanumeric': 0.18022782750203417, 'fraction_numerical': 0.0040683482506102524, 'mean_word_length': 3.6221804511278197, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, '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': '4733952', 'n_tokens_mistral': 862, 'n_tokens_neox': 816, 'n_words': 172}