<commit_before>//
//  LottieView.swift
//  lottie-swift-iOS
//
//  Created by <NAME> on 2/6/19.
//

import Foundation
import AppKit

  case bottom
  case bottomLeft
  case bottomRight
  case center
  case left
  case redraw
  case right
public enum LottieContentMode: Int {
  case scaleToFill
  case scaleAspectFit
  case scaleAspectFill
  case top
  case topLeft
  case topRight
}

/// A wrapper around NSView for cross platform compatibility.

public class LottieView: NSView {
  
  var screenScale: CGFloat {
    return NSApp.mainWindow?.backingScaleFactor ?? 1
  }
  
  var viewLayer: CALayer? {
    return layer
  }
  
  func layoutAnimation() {
    
  }
  
  func animationMovedToWindow() {
    
  }
  
  public override func viewDidMoveToWindow() {
    super.viewDidMoveToWindow()
    animationMovedToWindow()
  }
  
  func commonInit() {
    self.wantsLayer = true
  }
  
  func setNeedsLayout() {
    self.needsLayout = true
  }
  
  func layoutIfNeeded() {
    
  }
  
  public override var wantsUpdateLayer: Bool {
    return true
  }
  
  public override var isFlipped: Bool {
    return true
  }
  
  public var contentMode: LottieContentMode = .scaleAspectFit {
    didSet {
      setNeedsLayout()
    }
  }
  
  public override func layout() {
    super.layout()
    CATransaction.begin()
    CATransaction.setDisableActions(true)
    self.layoutAnimation()
    CATransaction.commit()
  }
  
  @objc func animationWillMoveToBackground() {
  }
  
  @objc func animationWillEnterForeground() {
  }
  
}
<commit_msg>Reorder LottieContentMode to match UIView.ContentMode<commit_after>//
//  LottieView.swift
//  lottie-swift-iOS
//
//  Created by <NAME> on 2/6/19.
//

import Foundation
import AppKit

public enum LottieContentMode: Int {
  case scaleToFill
  case scaleAspectFit
  case scaleAspectFill
  case redraw
  case center
  case top
  case bottom
  case left
  case right
  case topLeft
  case topRight
  case bottomLeft
  case bottomRight
}

/// A wrapper around NSView for cross platform compatibility.

public class LottieView: NSView {
  
  var screenScale: CGFloat {
    return NSApp.mainWindow?.backingScaleFactor ?? 1
  }
  
  var viewLayer: CALayer? {
    return layer
  }
  
  func layoutAnimation() {
    
  }
  
  func animationMovedToWindow() {
    
  }
  
  public override func viewDidMoveToWindow() {
    super.viewDidMoveToWindow()
    animationMovedToWindow()
  }
  
  func commonInit() {
    self.wantsLayer = true
  }
  
  func setNeedsLayout() {
    self.needsLayout = true
  }
  
  func layoutIfNeeded() {
    
  }
  
  public override var wantsUpdateLayer: Bool {
    return true
  }
  
  public override var isFlipped: Bool {
    return true
  }
  
  public var contentMode: LottieContentMode = .scaleAspectFit {
    didSet {
      setNeedsLayout()
    }
  }
  
  public override func layout() {
    super.layout()
    CATransaction.begin()
    CATransaction.setDisableActions(true)
    self.layoutAnimation()
    CATransaction.commit()
  }
  
  @objc func animationWillMoveToBackground() {
  }
  
  @objc func animationWillEnterForeground() {
  }
  
}

{'fraction_non_alphanumeric': 0.0791343669250646, 'fraction_numerical': 0.003229974160206718, 'mean_word_length': 2.722355769230769, 'pattern_counts': {'":': 0, '<': 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': '4815173', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1028, 'n_words': 246}