 				edge.target = net.nodes.filter((node) -> node.id == edge.target.id)[0]
 
 			# motion starts here
-			svg.on('mousedown', mousedown).on('mousemove', mousemove).on 'mouseup', mouseup
+			svg.on('mousedown', mousedown)
+			.on('mousemove', mousemove)
+			.on('mouseup', mouseup)
+			.on('touchmove', mousemove)
+			.on('touchend', mouseup)
 			restart()
+
+			document.body.addEventListener('touchmove', (e) -> e.preventDefault())
 
 		catch error
 			console.error error

				return

			$scope.net = net
			$scope.deleteNet = () -> netStorageService.deleteNet(net.name)

			svg = d3.select('#main-canvas svg')

					net.getActiveTool().mouseUpOnNode(net, mouseUpNode, mouseDownNode, dragLine)
					$scope.$apply() # Quick save net to storage

					selectedNode = null
					restart()

				.on 'dblclick', (node) ->
					net.getActiveTool().dblClickOnNode(net, node)
					restart()

				.on 'touchend', (startNode) ->

					# We need to calculate the nearest node by ourselves
					smallestDistance = 50
					nearestNode = null
					for node in net.nodes
						xOffset = d3.mouse(this)[0]+startNode.x - node.x
						yOffset = d3.mouse(this)[1]+startNode.y - node.y
						distance = Math.sqrt(xOffset*xOffset+yOffset*yOffset)
						if distance < smallestDistance
							smallestDistance = distance
							nearestNode = node
					
					if nearestNode
						mouseUpNode = nearestNode
						net.getActiveTool().mouseUpOnNode(net, mouseUpNode, mouseDownNode, dragLine)
						$scope.$apply() # Quick save net to storage

						selectedNode = null
						restart()

				# show node text
				newNodes.append('svg:text').attr('x', (node) -> node.labelXoffset).attr('y', (node) -> node.labelYoffset).attr('class', 'label nodeLabel').text((node) -> converterService.getNodeFromData(node).getText())
