diff --git a/frontend/src/Metamaps/JIT.js b/frontend/src/Metamaps/JIT.js index c8da91f8..b0aee7ea 100644 --- a/frontend/src/Metamaps/JIT.js +++ b/frontend/src/Metamaps/JIT.js @@ -1,15 +1,10 @@ -/* global $, Image, CanvasLoader */ +/* global $, Image */ import _ from 'lodash' -import outdent from 'outdent' import clipboard from 'clipboard-js' -import React from 'react' -import ReactDOM from 'react-dom' import $jit from '../patched/JIT' -import MetacodeSelect from '../components/MetacodeSelect' - import Active from './Active' import ContextMenu from './Views/ContextMenu' import Control from './Control' @@ -1347,16 +1342,11 @@ const JIT = { selectNodeOnRightClickHandler: function(node, e) { // the 'node' variable is a JIT node, the one that was clicked on // the 'e' variable is the click event - e.preventDefault() e.stopPropagation() - if (Visualize.mGraph.busy) return - - // select the node Control.selectNode(node, e) ContextMenu.selectNode(ReactApp.render, node, {x: e.clientX, y: e.clientY}) - }, // selectNodeOnRightClickHandler, selectEdgeOnClickHandler: function(adj, e) { if (Visualize.mGraph.busy) return diff --git a/frontend/src/Metamaps/Views/ContextMenu.js b/frontend/src/Metamaps/Views/ContextMenu.js index 3aa9784a..74fa1751 100644 --- a/frontend/src/Metamaps/Views/ContextMenu.js +++ b/frontend/src/Metamaps/Views/ContextMenu.js @@ -1,3 +1,4 @@ +/* global $ */ import Control from '../Control' import DataModel from '../DataModel' import Selected from '../Selected' diff --git a/frontend/src/components/MapView/index.js b/frontend/src/components/MapView/index.js index 3e51691d..d2cc90fd 100644 --- a/frontend/src/components/MapView/index.js +++ b/frontend/src/components/MapView/index.js @@ -1,4 +1,4 @@ - import React, { Component } from 'react' +import React, { Component } from 'react' import PropTypes from 'prop-types' import ContextMenu from '../common/ContextMenu' @@ -10,7 +10,6 @@ import VisualizationControls from '../common/VisualizationControls' import MapChat from './MapChat' import TopicCard from '../TopicCard' - export default class MapView extends Component { static propTypes = { diff --git a/frontend/src/components/common/ContextMenu.js b/frontend/src/components/common/ContextMenu.js index b5431c56..5ffc7755 100644 --- a/frontend/src/components/common/ContextMenu.js +++ b/frontend/src/components/common/ContextMenu.js @@ -78,9 +78,9 @@ class ContextMenu extends Component { hide = () => { const { contextHide } = this.props - return
  • -
    Hide until refresh -
    Ctrl+H
    + return
  • +
    Hide until refresh +
    Ctrl+H
  • } @@ -90,9 +90,9 @@ class ContextMenu extends Component { if (!canEditMap) { return null } - return
  • -
    Remove from map -
    Ctrl+M
    + return
  • +
    Remove from map +
    Ctrl+M
  • } @@ -102,9 +102,9 @@ class ContextMenu extends Component { if (!canEditMap) { return null } - return
  • -
    Delete -
    Ctrl+D
    + return
  • +
    Delete +
    Ctrl+D
  • } @@ -113,10 +113,10 @@ class ContextMenu extends Component { if (!(contextNode && topicId)) { return null } - return
  • contextCenterOn(contextNode.id)}> -
    Center this topic -
    Alt+E
    +
    Center this topic +
    Alt+E
  • } @@ -125,9 +125,9 @@ class ContextMenu extends Component { if (!contextNode) { return null } - return
  • contextPopoutTopic(contextNode.id)}> -
    Open in new tab +
    Open in new tab
  • } @@ -136,23 +136,23 @@ class ContextMenu extends Component { if (!currentUser) { return null } - return
  • -
    Change permissions + return
  • +
    Change permissions -
    +
  • } @@ -162,16 +162,16 @@ class ContextMenu extends Component { if (!currentUser) { return null } - return
  • -
    Change metacode -
    + return
  • +
    Change metacode +
    { contextOnMetacodeSelect(contextNode && contextNode.id, id) }} metacodeSets={metacodeSets} />
    -
    +
  • } @@ -188,13 +188,13 @@ class ContextMenu extends Component { if (!(contextNode && topicId)) { return null } - return
  • -
    Reveal siblings -