<commit_before>/**
 * Source: openLayers3.js
 * Copyright (c) 2013-2014 Oculus Info Inc.
 * @fileOverview Aperture OpenLayers 3.x integration APIs
 */



/*
 * TODO: Create a generic container layer that just creates a canvas for children
 * to use.  Map lat/lon to [0,1] ranges and then renderers can scale x/y based on
 * size of canvas.  Then can make MapNodeLayer derive from this layer.  This layer
 * could be used as parent for a layer drawing a series of points/labels, for
 * example.
 */

aperture.geo = aperture.geo || {};

/**
 * @namespace Geospatial vizlet layers. If not used, may be excluded.
 * @requires OpenLayers2
 */
aperture.geo.ol = (
/** @private */
function(ns) {

	if (!window.ol) {
		aperture.log.info('OpenLayers 3 js not present. Skipping OL3 map api implementation.');
		return ns;
	}


	/**********************************************************************/


	/**
	 * @private
	 *
	 * Openlayers Overlay subclass that positions a
	 */
	var CoveringOverlay = function( options ) {
		options = options || {};

		// Create host element
		options.element = document.createElement('div');
		options.positioning = 'center-center';

		ol.Overlay.call(this, options);

		// Allow mouse events to hit map in areas not covered by aperture visuals
		this.getElement().style.pointerEvents = 'none';
		this.getElement().parentElement.style.pointerEvents = 'none';

		// When map is set/changed register moveend listener
		this.on('change:map', function() {
			var map = this.getMap();
			if (this.moveEndKey) {
				map.getView().unByKey( this.zoomKey );
				map.unByKey( this.moveEndKey );
				this.moveEndKey = null;
				this.zoomKey = null;
			}
			if (map) {
				this.moveEndKey = map.on('moveend', this.postMove, this);
				this.zoomKey = map.getView().on('change:resolution', this.preMove, this);
			}
		}, this);
	};

	ol.inherits(CoveringOverlay, ol.Overlay);

	/**
	 * @private<commit_msg>Fix initial render - update layer on map connect<commit_after>/**
 * Source: openLayers3.js
 * Copyright (c) 2013-2014 Oculus Info Inc.
 * @fileOverview Aperture OpenLayers 3.x integration APIs
 */



/*
 * TODO: Create a generic container layer that just creates a canvas for children
 * to use.  Map lat/lon to [0,1] ranges and then renderers can scale x/y based on
 * size of canvas.  Then can make MapNodeLayer derive from this layer.  This layer
 * could be used as parent for a layer drawing a series of points/labels, for
 * example.
 */

aperture.geo = aperture.geo || {};

/**
 * @namespace Geospatial vizlet layers. If not used, may be excluded.
 * @requires OpenLayers2
 */
aperture.geo.ol = (
/** @private */
function(ns) {

	if (!window.ol) {
		aperture.log.info('OpenLayers 3 js not present. Skipping OL3 map api implementation.');
		return ns;
	}


	/**********************************************************************/


	/**
	 * @private
	 *
	 * Openlayers Overlay subclass that positions a
	 */
	var CoveringOverlay = function( options ) {
		options = options || {};

		// Create host element
		options.element = document.createElement('div');
		options.positioning = 'center-center';

		ol.Overlay.call(this, options);

		// Allow mouse events to hit map in areas not covered by aperture visuals
		this.getElement().style.pointerEvents = 'none';
		this.getElement().parentElement.style.pointerEvents = 'none';

		// When map is set/changed register moveend listener
		this.on('change:map', function() {
			var map = this.getMap();
			if (this.moveEndKey) {
				map.getView().unByKey( this.zoomKey );
				map.unByKey( this.moveEndKey );
				this.moveEndKey = null;
				this.zoomKey = null;
			}
			if (map) {
				this.moveEndKey = map.on('moveend', this.postMove, this);
				this.zoomKey = map.getView().on('change:resolution', this.preMove, this);
				// Set initial state
				this.postMove();
			}
		}, this);
	};

	ol.inherits(CoveringOverlay, ol.Overlay);

	/**
	 * @private
{'fraction_non_alphanumeric': 0.16058207812101097, 'fraction_numerical': 0.007658922644881287, 'mean_word_length': 3.4726027397260273, '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': '4263290', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1183, 'n_words': 364}