<commit_before>mapInput = () ->
	scope:
		'onMapClicked': '&'

	link: (scope, element, attrs) ->
		isNewMarkerNotSet: true
		console.log 'mapInput'
		map = L.map "#{attrs.id}"
			.setView [ 49, 32], 13

		L.Icon.Default.imagePath = 'images'

		initialMapSettings =
			maxZoom: 18
			attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
						'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
						'Imagery © <a href="http://mapbox.com">Mapbox</a>'
			id: 'thymajesty.kbp9jbaa'

		L.tileLayer 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png',
			initialMapSettings
		.addTo map

		map.on 'click', (e) ->
			if isNewMarkerNotSet
				console.log('clicked', e.latlng)
				isNewMarkerNotSet = false

				scope.onMapClicked data: e.latlng
				L.marker( e.latlng,
					draggable:true
					icon: L.divIcon
						className: 'count-icon'
						iconSize: [40, 40]
					).on('dragend', (event) ->
							scope.onMapClicked data: event.target._latlng
							console.log('dragend', event.target._latlng)
						).addTo(map)




angular.module 'best.directives'
	.directive 'mapInput', mapInput<commit_msg>map fix<commit_after>mapInput = () ->
	scope:
		'onMapClicked': '&'

	link: (scope, element, attrs) ->
		isNewMarkerNotSet = true
		console.log 'mapInput'
		map = L.map "#{attrs.id}"
			.setView [ 49, 32], 13
		console.log 'map', map
		L.Icon.Default.imagePath = 'images'

		initialMapSettings =
			maxZoom: 18
			attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
						'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
						'Imagery © <a href="http://mapbox.com">Mapbox</a>'
			id: 'thymajesty.kbp9jbaa'

		L.tileLayer 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png',
			initialMapSettings
		.addTo map

		map.on 'click', (e) ->
			console.log(e.latlng)
			if isNewMarkerNotSet
				console.log('clicked', e.latlng)
				isNewMarkerNotSet = false

				scope.onMapClicked data: e.latlng
				L.marker( e.latlng,
					draggable:true
					icon: L.divIcon
						className: 'count-icon'
						iconSize: [40, 40]
					).on('dragend', (event) ->
							scope.onMapClicked data: event.target._latlng
							console.log('dragend', event.target._latlng)
						).addTo(map)




angular.module 'best.directives'
	.directive 'mapInput', mapInput
{'fraction_non_alphanumeric': 0.17435037720033528, 'fraction_numerical': 0.013411567476948869, 'mean_word_length': 3.129757785467128, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, 'https://': 2, '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': '4217757', 'n_tokens_mistral': 1127, 'n_tokens_neox': 910, 'n_words': 160}