<commit_before>'use strict';


angular.module('emuwebApp')
	.directive('level', function () {
		return {
			templateUrl: 'views/level.html',
			restrict: 'E',
			link: function postLink(scope, element, attr) {
				// select the needed DOM items from the template
				var canvas = element.find('canvas');

				scope.open = attr.open;

				///////////////
				// watches

				scope.$watch('vs.curViewPort', function () {
					drawLevelDetails(scope.level, scope.vs, scope.cps);
					drawLevelMarkup(scope.level, scope.vs, scope.cps);
				}, true);
<commit_msg>full redraw only on sS or eS change<commit_after>'use strict';


angular.module('emuwebApp')
	.directive('level', function () {
		return {
			templateUrl: 'views/level.html',
			restrict: 'E',
			link: function postLink(scope, element, attr) {
				// select the needed DOM items from the template
				var canvas = element.find('canvas');

				scope.open = attr.open;

				///////////////
				// watches

				scope.$watch('vs.curViewPort', function (newValue, oldValue) {
					if (oldValue.sS !== newValue.sS || oldValue.eS !== newValue.eS) {
						drawLevelDetails(scope.level, scope.vs, scope.cps);
						drawLevelMarkup(scope.level, scope.vs, scope.cps);
					} else {
						drawLevelMarkup(scope.level, scope.vs, scope.cps);
					}
				}, true);

{'fraction_non_alphanumeric': 0.1675592960979342, 'fraction_numerical': 0.0, 'mean_word_length': 2.9279279279279278, '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': '2466343', 'n_tokens_mistral': 513, 'n_tokens_neox': 413, 'n_words': 94}