<commit_before><!DOCTYPE html>
<html ng-app="MyApp">
<head>
<title>Basic angular-image-mask usage</title>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript" src="angular-image-mask.js"></script>
<script>
	var app = angular.module('MyApp', ['tjlaxs.aim']);
	app.controller('BasicController', ['$scope', function($scope) {
		$scope.paths = [
			{
				name: 'Polygon 1',
				type: 'Polygon',
				data: [ [100, 100],
					[600, 50],
					[500, 300],
					[200, 400],
					[50, 200]]
			},
			{
				name: 'Line 1',
				type: 'Line',
				data: [ [30, 30],
					[400, 450]]
			},
			{
				name: 'Rectangle 1',
				type: 'Rectangle',
				data: [ [150, 150],
					[300, 300]]
			},
		];
	}]);
</script>
<style>
.container { 
    width:100%; height:100%; 
    position:relative;
}

.bgimg { 
    width:100%; height:100%; 
    position:absolute; top:0px; left:0px;
}

.cnvs { 
    width:100%; height:100%; 
    position:absolute; top:0px; left:0px;
    background-color: rgba(255,0,0,.1);
}

.outerContainer { 
    width:640px; height:480px; 
    margin: 0; 
    border:1px solid blue;
}
</style>
</head>

<body ng-controller="BasicController">

<h1>Mask</h1>
<div class="outerContainer">
<div class="container">
<img class="bgimg" src="img/test.png" />
<canvas class="cnvs" tjl-image-mask width="640" height="480" paths="paths"></canvas>
</div>
</div>

<div><h2>Html</h2><pre>&lt;canvas tjl-image-mask width="640" height="480" paths="paths"&gt;&lt;/canvas&gt;</pre></div>

<div><h2>Paths</h2><pre>{{paths | json}}</pre></div>

</body>
</html><commit_msg>Polygon selector, added buttons but not functionality to them.<commit_after><!DOCTYPE html>
<html ng-app="MyApp">
<head>
<title>Basic angular-image-mask usage</title>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript" src="angular-image-mask.js"></script>
<script>
	var app = angular.module('MyApp', ['tjlaxs.aim']);
	app.controller('BasicController', ['$scope', function($scope) {
		$scope.paths = [
			{
				name: 'Polygon 1',
				type: 'Polygon',
				data: [ [100, 100],
					[600, 50],
					[500, 300],
					[200, 400],
					[50, 200]]
			},
			{
				name: 'Line 1',
				type: 'Line',
				data: [ [30, 30],
					[400, 450]]
			},
			{
				name: 'Rectangle 1',
				type: 'Rectangle',
				data: [ [150, 150],
					[300, 300]]
			},
		];
	}]);
</script>
<style>
.container { 
    width:100%; height:100%; 
    position:relative;
}

.bgimg { 
    width:100%; height:100%; 
    position:absolute; top:0px; left:0px;
}

.cnvs { 
    width:100%; height:100%; 
    position:absolute; top:0px; left:0px;
    background-color: rgba(255,0,0,.1);
}

.outerContainer { 
    width:640px; height:480px; 
    margin: 0; 
    border:1px solid blue;
}

.mask-controller {
	display: flex;
	flex-direction: row;
}

</style>
</head>

<body ng-controller="BasicController">

<h1>Mask</h1>
<div class="outerContainer">
<div class="container">
<img class="bgimg" alt="Camera feed" src="img/test.png" />
<canvas class="cnvs" tjl-image-mask width="640" height="480" paths="paths"></canvas>
</div>
</div>
<div class="mask-controller">
<div class="shapes-controller">
	<button>New polygon</button><br>
	<button>Remove polygon</button><br>
	<select name="shapeSelect" ng-model="paths.selectedShape" ng-options="shape.name for shape in paths track by shape.name">
	</select>
</div>
<div class="shape-editor">
	<p>Selected shape: {{paths.selectedShape}}</p>
	<p>
	<label for="shape-name">Name</label>
	<input type="text" ng-model="paths.selectedShape.name"></input>
	</p>
</div>
</div>

<div><h2>Html</h2><pre>&lt;canvas tjl-image-mask width="640" height="480" paths="paths"&gt;&lt;/canvas&gt;</pre></div>

<div><h2>Paths</h2><pre>{{paths | json}}</pre></div>

</body>
</html>
{'fraction_non_alphanumeric': 0.2172990183072433, 'fraction_numerical': 0.0567789864685593, 'mean_word_length': 3.9540078843626807, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, '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': '5591633', 'n_tokens_mistral': 1719, 'n_tokens_neox': 1407, 'n_words': 281}