clear the right click menu the right way
This commit is contained in:
parent
e290244404
commit
da9e44afa0
3 changed files with 8 additions and 6 deletions
|
@ -350,7 +350,7 @@ const JIT = {
|
|||
// Add also a click handler to nodes
|
||||
onClick: function(node, eventInfo, e) {
|
||||
// remove the rightclickmenu
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
|
||||
if (Mouse.boxStartCoordinates) {
|
||||
if (e.ctrlKey) {
|
||||
|
@ -391,7 +391,7 @@ const JIT = {
|
|||
// Add also a click handler to nodes
|
||||
onRightClick: function(node, eventInfo, e) {
|
||||
// remove the rightclickmenu
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
|
||||
if (Mouse.boxStartCoordinates) {
|
||||
Create.newSynapse.hide()
|
||||
|
@ -1007,7 +1007,7 @@ const JIT = {
|
|||
TopicCard.hideCard()
|
||||
SynapseCard.hideCard()
|
||||
Create.newTopic.hide()
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
// reset the draw synapse positions to false
|
||||
Mouse.synapseStartCoordinates = []
|
||||
Mouse.synapseEndCoordinates = null
|
||||
|
@ -1412,7 +1412,7 @@ const JIT = {
|
|||
Control.selectEdge(adj)
|
||||
|
||||
// delete old right click menu
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
// create new menu for clicked on node
|
||||
const rightclickmenu = document.createElement('div')
|
||||
rightclickmenu.className = 'rightclickmenu'
|
||||
|
|
|
@ -16,6 +16,7 @@ import Loading from '../Loading'
|
|||
import Realtime from '../Realtime'
|
||||
import Selected from '../Selected'
|
||||
import SynapseCard from '../SynapseCard'
|
||||
import ContextMenu from '../Views/ContextMenu'
|
||||
import TopicCard from '../Views/TopicCard'
|
||||
import Visualize from '../Visualize'
|
||||
|
||||
|
@ -137,7 +138,7 @@ const Map = {
|
|||
if (Active.Map) {
|
||||
$('.main').removeClass('compressed')
|
||||
AutoLayout.resetSpiral()
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
TopicCard.hideCard()
|
||||
SynapseCard.hideCard()
|
||||
Create.newTopic.hide(true) // true means force (and override pinned)
|
||||
|
|
|
@ -15,6 +15,7 @@ import Selected from './Selected'
|
|||
import Settings from './Settings'
|
||||
import SynapseCard from './SynapseCard'
|
||||
import TopicCard from './Views/TopicCard'
|
||||
import ContextMenu from './Views/ContextMenu'
|
||||
import Util from './Util'
|
||||
import Visualize from './Visualize'
|
||||
|
||||
|
@ -68,7 +69,7 @@ const Topic = {
|
|||
},
|
||||
end: function() {
|
||||
if (Active.Topic) {
|
||||
$('.rightclickmenu').remove()
|
||||
ContextMenu.reset()
|
||||
TopicCard.hideCard()
|
||||
SynapseCard.hideCard()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue