<commit_before>transporter.module.create('core/poses', function(requires) {

}, function(thisModule) {


thisModule.addSlots(avocado, function(add) {

  add.creator('poses', {}, {category: ['ui', 'poses']});

});


thisModule.addSlots(avocado.poses, function(add) {

  add.creator('abstract', {});

  add.creator('tree', Object.create(avocado.poses['abstract']));

  add.creator('list', Object.create(avocado.poses['abstract']));

  add.creator('snapshot', Object.create(avocado.poses['abstract']));

  add.creator('manager', {});

});


thisModule.addSlots(avocado.poses['abstract'], function(add) {

  add.method('create', function () {
    var c = Object.create(this);
    c.initialize.apply(c, arguments);
    return c;
  }, {category: ['creating']});

  add.method('initialize', function (name) {
    this._name = name;
  }, {category: ['creating']});

  add.method('name', function () {
    return this._name;
  }, {category: ['accessing']});

  add.method('toString', function () {
    return this.name();
  }, {category: ['printing']});

  add.method('recreateInContainer', function (container) {
    var originalScale = container.getScale();
    var originalSpace = container.getExtent().scaleBy(originalScale);
    
    this.eachElement(function(e) {
      e.poser.isPartOfCurrentPose = true;
      // do bad things happen if I make the uiState thing happen before moving the poser?
      if (e.uiState) { e.poser.assumeUIState(e.uiState); }
      
      var poserOrPlaceholder = e.poser;
      if (e.poser.world()) {
        poserOrPlaceholder = new avocado.PlaceholderMorph(e.poser);
      }
      container.addMorphAt(poserOrPlaceholder, e.position);
    }.bind(this));

    container.allPotentialPosers().each(function(m) {
      if (m.isPartOfCurrentPose) {
        delete m.isPartOfCurrentPose;
      } else if (! m.shouldIgnorePoses()) {
        // I am undecided on whether this is a good idea or not. It's annoying if
        // stuff I want zooms away, but it's also annoying if stuff zooms onto
        // other stuff and the screen gets all cluttered.
        var shouldUninvolvedPosersGoAway = false;
        if (shouldUninvolvedPosersGoAway) {<commit_msg>Fixed a bug with poses that I introduced recently.<commit_after>transporter.module.create('core/poses', function(requires) {

}, function(thisModule) {


thisModule.addSlots(avocado, function(add) {

  add.creator('poses', {}, {category: ['ui', 'poses']});

});


thisModule.addSlots(avocado.poses, function(add) {

  add.creator('abstract', {});

  add.creator('tree', Object.create(avocado.poses['abstract']));

  add.creator('list', Object.create(avocado.poses['abstract']));

  add.creator('snapshot', Object.create(avocado.poses['abstract']));

  add.creator('manager', {});

});


thisModule.addSlots(avocado.poses['abstract'], function(add) {

  add.method('create', function () {
    var c = Object.create(this);
    c.initialize.apply(c, arguments);
    return c;
  }, {category: ['creating']});

  add.method('initialize', function (name) {
    this._name = name;
  }, {category: ['creating']});

  add.method('name', function () {
    return this._name;
  }, {category: ['accessing']});

  add.method('toString', function () {
    return this.name();
  }, {category: ['printing']});

  add.method('recreateInContainer', function (container) {
    var originalScale = container.getScale();
    var originalSpace = container.getExtent().scaleBy(originalScale);
    
    this.eachElement(function(e) {
      e.poser.isPartOfCurrentPose = true;
      // do bad things happen if I make the uiState thing happen before moving the poser?
      if (e.uiState) { e.poser.assumeUIState(e.uiState); }
      
      if (this._shouldBeUnobtrusive) {
        var poserOrPlaceholder = e.poser;
        if (e.poser.world()) {
          poserOrPlaceholder = new avocado.PlaceholderMorph(e.poser);
        }
        container.addMorphAt(poserOrPlaceholder, e.position);
      } else {
        e.poser.ensureIsInWorld(container, e.position, true, true, true);
      }
    }.bind(this));

    container.allPotentialPosers().each(function(m) {
      if (m.isPartOfCurrentPose) {
        delete m.isPartOfCurrentPose;
      } else if (! m.shouldIgnorePoses()) {
        // I am undecided on whether this is a good idea or not. It's annoying if
        // stuff I want zooms away, but it's also annoying if stuff zooms onto
        // other stuff and the screen gets all cluttered.
        var shouldUninvolvedPosersGoAway = false;
        if (shouldUninvolvedPosersGoAway) {
{'fraction_non_alphanumeric': 0.1532702048007047, 'fraction_numerical': 0.0, 'mean_word_length': 3.5602409638554215, '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': '7226998', 'n_tokens_mistral': 1471, 'n_tokens_neox': 1407, 'n_words': 298}