<commit_before>/*
 * L.Handler.ShiftDragZoom is used internally by L.Map to add shift-drag zoom (zoom to a selected bounding box).
 */

L.Handler.ShiftDragZoom = L.Handler.extend({
	enable: function() {
		if (this._enabled) { return; }
		
		this._container = this._map._container;
		this._pane = this._map._panes.overlayPane;
		
		L.DomEvent.addListener(this._container, 'mousedown', this._onMouseDown, this);
		
		this._enabled = true;
	},
	
	disable: function() {
		if (!this._enabled) { return; }
		
		L.DomEvent.removeListener(this._container, 'mousedown', this._onMouseDown);
		
		this._enabled = false;
	},
	
	_onMouseDown: function(e) {
		if (!e.shiftKey || ((e.which != 1) && (e.button != 1))) { return false; }
		
		L.DomUtil.disableTextSelection();
		
		this._startLayerPoint = this._map.mouseEventToLayerPoint(e);
		
		this._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._pane);
		L.DomUtil.setPosition(this._box, this._startLayerPoint);<commit_msg>ShiftDragZoom.enable fix<commit_after>/*
 * L.Handler.ShiftDragZoom is used internally by L.Map to add shift-drag zoom (zoom to a selected bounding box).
 */

L.Handler.ShiftDragZoom = L.Handler.extend({
	initialize: function(map, enabled) {
		this._container = map._container;
		this._pane = map._panes.overlayPane;

		L.Handler.prototype.initialize.apply(this, arguments);
	},
	
	enable: function() {
		if (this._enabled) { return; }
		
		L.DomEvent.addListener(this._container, 'mousedown', this._onMouseDown, this);
		
		this._enabled = true;
	},
	
	disable: function() {
		if (!this._enabled) { return; }
		
		L.DomEvent.removeListener(this._container, 'mousedown', this._onMouseDown);
		
		this._enabled = false;
	},
	
	_onMouseDown: function(e) {
		if (!e.shiftKey || ((e.which != 1) && (e.button != 1))) { return false; }
		
		L.DomUtil.disableTextSelection();
		
		this._startLayerPoint = this._map.mouseEventToLayerPoint(e);
		
		this._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._pane);
		L.DomUtil.setPosition(this._box, this._startLayerPoint);
{'fraction_non_alphanumeric': 0.15422396856581533, 'fraction_numerical': 0.0019646365422396855, 'mean_word_length': 3.9926470588235294, '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': '1755599', 'n_tokens_mistral': 763, 'n_tokens_neox': 667, 'n_words': 131}