|  | @@ -173,7 +173,7 @@ export default {
 | 
	
		
			
				|  |  |        switch (ev.key) {
 | 
	
		
			
				|  |  |          case 'Enter':
 | 
	
		
			
				|  |  |            if (!single) { return }
 | 
	
		
			
				|  |  | -          this.nodeInspect(single)
 | 
	
		
			
				|  |  | +          this.nodeInspect(single, true)
 | 
	
		
			
				|  |  |            break
 | 
	
		
			
				|  |  |          case 'Delete':
 | 
	
		
			
				|  |  |            if (!this.nodeSelection) { return }
 | 
	
	
		
			
				|  | @@ -244,8 +244,22 @@ export default {
 | 
	
		
			
				|  |  |          drop: (ev) => {
 | 
	
		
			
				|  |  |            this.pointerLink.active = false
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -          // find Parent
 | 
	
		
			
				|  |  | +          console.log('taerget', ev.target)
 | 
	
		
			
				|  |  | +          if (ev.target.matches('.flow-pan-zoom__transformer')) {
 | 
	
		
			
				|  |  | +            if (isInput) {
 | 
	
		
			
				|  |  | +              console.error('Invalid target')
 | 
	
		
			
				|  |  | +              return
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            const pt = this.transformedPoint(ev.x, ev.y)
 | 
	
		
			
				|  |  | +            this.createPortal(nodeId, pt.x, pt.y)
 | 
	
		
			
				|  |  | +            return
 | 
	
		
			
				|  |  | +            // Create a thing here
 | 
	
		
			
				|  |  | +            // if origin socket is an output only
 | 
	
		
			
				|  |  | +            // Empty drop, try to create a portal here
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +          // find Parent
 | 
	
		
			
				|  |  |            var curTarget = ev.target
 | 
	
		
			
				|  |  |            for (; curTarget.hasAttribute !== undefined && curTarget !== document.body; curTarget = curTarget.parentNode) {
 | 
	
		
			
				|  |  |              if (curTarget.hasAttribute('data-nodeid')) {
 | 
	
	
		
			
				|  | @@ -372,6 +386,7 @@ export default {
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    // Is this used?
 | 
	
		
			
				|  |  |      nodeInspect (tnode, force) {
 | 
	
		
			
				|  |  |        this.$emit('nodeInspect', tnode, force)
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -393,7 +408,6 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      // this.NODE_INSPECT(tnode.id)
 | 
	
		
			
				|  |  |        this.nodeInspect(tnode)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        // Switch selection
 | 
	
	
		
			
				|  | @@ -493,7 +507,6 @@ export default {
 | 
	
		
			
				|  |  |      viewPointerDown (ev) {
 | 
	
		
			
				|  |  |        if (ev.button !== 0) return
 | 
	
		
			
				|  |  |        ev.preventDefault()
 | 
	
		
			
				|  |  | -      this.nodeSelection = {}
 | 
	
		
			
				|  |  |        const p = this.transformedPoint(ev.x, ev.y)
 | 
	
		
			
				|  |  |        this.selector = {x: p.x, y: p.y, width: 0, height: 0}
 | 
	
		
			
				|  |  |        utils.createDrag({
 | 
	
	
		
			
				|  | @@ -511,6 +524,7 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          drop: (ev) => {
 | 
	
		
			
				|  |  | +          if (!ev.shiftKey) this.nodeSelection = {}
 | 
	
		
			
				|  |  |            for (let n in this.nodeData.nodes) {
 | 
	
		
			
				|  |  |              const node = this.nodeData.nodes[n]
 | 
	
		
			
				|  |  |              if (node.x > this.selector.x && node.x < (this.selector.x + this.selector.width) &&
 | 
	
	
		
			
				|  | @@ -526,18 +540,29 @@ export default {
 | 
	
		
			
				|  |  |        const n = this.nodeData.nodes.find(n => n.src === 'Output')
 | 
	
		
			
				|  |  |        this.NODE_PROCESS(n.id)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    createPortal (nodeID) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    createPortal (nodeID, x, y) {
 | 
	
		
			
				|  |  |        // Find nodeID
 | 
	
		
			
				|  |  |        let node = this.nodeData.nodes.find(n => n.id === nodeID)
 | 
	
		
			
				|  |  |        if (!node) {
 | 
	
		
			
				|  |  |          this.NOTIFICATION_ADD('invalid node ID' + nodeID)
 | 
	
		
			
				|  |  |          return
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      // If nodeID is a portal we recurse back
 | 
	
		
			
				|  |  | +      if (node.src === 'Portal From') {
 | 
	
		
			
				|  |  | +        const nodefromId = node.prop['portal from']
 | 
	
		
			
				|  |  | +        this.createPortal(nodefromId, x, y)
 | 
	
		
			
				|  |  | +        return
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      x = x || node.x + 10
 | 
	
		
			
				|  |  | +      y = y || node.y + 10
 | 
	
		
			
				|  |  | +      console.log('X,Y:', x, y, 'nodexy', node.x, node.y)
 | 
	
		
			
				|  |  |        // Special node
 | 
	
		
			
				|  |  |        const portalNode = {
 | 
	
		
			
				|  |  |          id: utils.guid(),
 | 
	
		
			
				|  |  | -        x: node.x + 10,
 | 
	
		
			
				|  |  | -        y: node.y + 100, // Downthere/improve this
 | 
	
		
			
				|  |  | +        x: x,
 | 
	
		
			
				|  |  | +        y: y, // Downthere/improve this
 | 
	
		
			
				|  |  |          defaultInputs: {},
 | 
	
		
			
				|  |  |          label: node.label,
 | 
	
		
			
				|  |  |          color: node.color,
 |