<commit_before>/**
 * @fileoverview Soundworks client side orientation module
 * @author Sebastien.Robaszkiew<EMAIL>, <EMAIL>
 */
'use strict';

var ClientModule = require('./ClientModule');
var input = require('./input');

class ClientOrientation extends ClientModule {
  constructor(options = {}) {
    super('orientation', true);

    this.angle = 0;
    this.angleZero = 0;

    this.text = options.text || "<p>Point the phone exactly in front of you, and touch the screen.</p>";

    input.enableDeviceOrientation();

    input.on('deviceorientation', (orientationData) => {
      this.angle = orientationData.alpha;
    });
  }

  start() {
    super.start();

    var contentDiv = document.createElement('div');
    contentDiv.classList.add('centered-content');
    this.view.appendChild(contentDiv);

    contentDiv.innerHTML = this.text;

    this.view.addEventListener('click', () => {
      this.angleZero = this.angle;
      this.done();
    });
  }
}

module.exports = ClientOrientation;<commit_msg>Renamed angleReference and made some attributes private in Orientation<commit_after>/**
 * @fileoverview Soundworks client side orientation module
 * @author Sebastien.Robaszk<EMAIL>, <EMAIL>
 */
'use strict';

var ClientModule = require('./ClientModule');
var input = require('./input');

class ClientOrientation extends ClientModule {
  constructor(options = {}) {
    super('orientation', true);

    this.angleReference = 0;

    this.__angle = 0;
    this.__text = options.text || "<p>Point the phone exactly in front of you, and touch the screen.</p>";

    input.enableDeviceOrientation();

    input.on('deviceorientation', (orientationData) => {
      this.__angle = orientationData.alpha;
    });
  }

  start() {
    super.start();

    var contentDiv = document.createElement('div');
    contentDiv.classList.add('centered-content');
    this.view.appendChild(contentDiv);

    contentDiv.innerHTML = this.__text;

    this.view.addEventListener('click', () => {
      this.angleReference = this.__angle;
      this.done();
    });
  }
}

module.exports = ClientOrientation;
{'fraction_non_alphanumeric': 0.14394661582459486, 'fraction_numerical': 0.0019065776930409914, 'mean_word_length': 3.6957494407158835, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '4715430', 'n_tokens_mistral': 611, 'n_tokens_neox': 575, 'n_words': 133}