Added right click menu for deleting point to point measurments
Added right click menu for deleting point to point measurments

--- a/source/lib/scripts/CabinetEditor/Schematic/Other/P2PMeasurement.js
+++ b/source/lib/scripts/CabinetEditor/Schematic/Other/P2PMeasurement.js
@@ -8,6 +8,7 @@
 	 	'Geometry/LineSegment2D',
 	 	'Geometry/Point2D',
 
+	 	'Util/UI',
 	 	'Util/Class'
 	],
 	function(
@@ -19,6 +20,7 @@
 		LineSegment,
 		Point,
 
+		UI,
 		Class
 	){
 
@@ -65,6 +67,32 @@
 			return false;
 		};
 
+		P2PMeasurement.prototype.getContextMenu = function(windowPoint, schematicPoint, editor){
+
+			var t = this;
+
+			if(schematicPoint.distanceToPoint(this.textPoint) < 4){
+
+				return UI.contextMenu(
+					windowPoint.x,
+					windowPoint.y,
+					[
+					 	{
+					 		text: 'Delete Measurment',
+					 		callback: function(){
+					 			editor.schematic.removeByID(t.getID(), editor);
+					 			editor.animate();
+					 			editor.autoSave();
+					 		}
+					 	}
+					]
+				);
+			}
+
+			return null;
+
+		};
+
 		P2PMeasurement.prototype.renderTopView = function(ctx){
 
 			var length, lengthText, line, lp, rp;