<commit_before>goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.layer.Tile');
goog.require('ol.source.BingMaps');
goog.require('ol.source.OSM');

var osm = new ol.layer.Tile({
  source: new ol.source.OSM()
});
var bing = new ol.layer.Tile({
  source: new ol.source.BingMaps({
    key: '<KEY>',
    style: 'Aerial'
  })
});

var map = new ol.Map({
  layers: [osm, bing],
  renderer: ol.RendererHint.CANVAS,
  target: 'map',
  view: new ol.View2D({
    center: [0, 0],
    zoom: 2
  })
});

var swipe = document.getElementById('swipe');

bing.on('precompose', function(event) {
  var ctx = event.getContext();
  var width = ctx.canvas.width * (swipe.value / 100);

  ctx.save();
  ctx.beginPath();
  ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);
  ctx.clip();
});

bing.on('postcompose', function(event) {
  var ctx = event.getContext();
  ctx.restore();
});

swipe.addEventListener('change', function() {<commit_msg>Rename ol.source.BingMapsOptions style property to imagerySet<commit_after>goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.layer.Tile');
goog.require('ol.source.BingMaps');
goog.require('ol.source.OSM');

var osm = new ol.layer.Tile({
  source: new ol.source.OSM()
});
var bing = new ol.layer.Tile({
  source: new ol.source.BingMaps({
    key: '<KEY>',
    imagerySet: 'Aerial'
  })
});

var map = new ol.Map({
  layers: [osm, bing],
  renderer: ol.RendererHint.CANVAS,
  target: 'map',
  view: new ol.View2D({
    center: [0, 0],
    zoom: 2
  })
});

var swipe = document.getElementById('swipe');

bing.on('precompose', function(event) {
  var ctx = event.getContext();
  var width = ctx.canvas.width * (swipe.value / 100);

  ctx.save();
  ctx.beginPath();
  ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);
  ctx.clip();
});

bing.on('postcompose', function(event) {
  var ctx = event.getContext();
  ctx.restore();
});

swipe.addEventListener('change', function() {
{'fraction_non_alphanumeric': 0.19950617283950617, 'fraction_numerical': 0.008888888888888889, 'mean_word_length': 4.1421319796954315, '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': '1169005', 'n_tokens_mistral': 773, 'n_tokens_neox': 749, 'n_words': 149}