topic view shortcuts switch to Alt

This commit is contained in:
Devin Howard 2016-08-09 22:15:21 +08:00
parent 2c0ae7e84d
commit 7814ce153c
3 changed files with 15 additions and 10 deletions

View file

@ -1336,7 +1336,7 @@ Metamaps.JIT = {
if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>' if (Metamaps.Active.Map && Metamaps.Active.Mapper) menustring += '<li class="rc-delete ' + disabled + '"><div class="rc-icon"></div>Delete<div class="rc-keyboard">Ctrl+D</div></li>'
if (Metamaps.Active.Topic) { if (Metamaps.Active.Topic) {
menustring += '<li class="rc-center"><div class="rc-icon"></div>Center this topic<div class="rc-keyboard">Ctrl+E</div></li>' menustring += '<li class="rc-center"><div class="rc-icon"></div>Center this topic<div class="rc-keyboard">Alt+E</div></li>'
} }
menustring += '<li class="rc-popout"><div class="rc-icon"></div>Open in new tab</li>' menustring += '<li class="rc-popout"><div class="rc-icon"></div>Open in new tab</li>'
if (Metamaps.Active.Mapper) { if (Metamaps.Active.Mapper) {
@ -1361,7 +1361,7 @@ Metamaps.JIT = {
// set up the get sibling menu as a "lazy load" // set up the get sibling menu as a "lazy load"
// only fill in the submenu when they hover over the get siblings list item // only fill in the submenu when they hover over the get siblings list item
var siblingMenu = '<ul id="fetchSiblingList"> \ var siblingMenu = '<ul id="fetchSiblingList"> \
<li class="fetchAll">All<div class="rc-keyboard">Ctrl+R</div></li> \ <li class="fetchAll">All<div class="rc-keyboard">Alt+R</div></li> \
<li id="loadingSiblings"></li> \ <li id="loadingSiblings"></li> \
</ul>' </ul>'
menustring += '<li class="rc-siblings"><div class="rc-icon"></div>Reveal siblings' + siblingMenu + '<div class="expandLi"></div></li>' menustring += '<li class="rc-siblings"><div class="rc-icon"></div>Reveal siblings' + siblingMenu + '<div class="expandLi"></div></li>'

View file

@ -44,16 +44,21 @@ Metamaps.Listeners = {
} }
break break
case 69: // if e or E is pressed case 69: // if e or E is pressed
if (e.ctrlKey) { if (e.ctrlKey && Metamaps.Active.Map) {
e.preventDefault() e.preventDefault()
Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas)
break
}
if (e.altKey && Metamaps.Active.Topic) {
e.preventDefault()
if (Metamaps.Active.Topic) { if (Metamaps.Active.Topic) {
self.centerAndReveal(Metamaps.Selected.Nodes, { self.centerAndReveal(Metamaps.Selected.Nodes, {
center: true, center: true,
reveal: false reveal: false
}) })
} else if (Metamaps.Active.Map) {
Metamaps.JIT.zoomExtents(null, Metamaps.Visualize.mGraph.canvas)
} }
break
} }
break break
case 72: // if h or H is pressed case 72: // if h or H is pressed
@ -71,7 +76,7 @@ Metamaps.Listeners = {
} }
break break
case 82: // if r or R is pressed case 82: // if r or R is pressed
if (e.ctrlKey && Metamaps.Active.Topic) { if (e.altKey && Metamaps.Active.Topic) {
e.preventDefault() e.preventDefault()
self.centerAndReveal(Metamaps.Selected.Nodes, { self.centerAndReveal(Metamaps.Selected.Nodes, {
center: false, center: false,
@ -80,7 +85,7 @@ Metamaps.Listeners = {
} }
break break
case 84: // if t or T is pressed case 84: // if t or T is pressed
if (e.ctrlKey && Metamaps.Active.Topic) { if (e.altKey && Metamaps.Active.Topic) {
e.preventDefault() e.preventDefault()
self.centerAndReveal(Metamaps.Selected.Nodes, { self.centerAndReveal(Metamaps.Selected.Nodes, {
center: true, center: true,

View file

@ -26,9 +26,9 @@
</ul> </ul>
<div id="csTopicView"> <div id="csTopicView">
<div class="csItem"><span class="csTitle">Recenter Topics around chosen Topic:</span> Alt + click on the topic OR Ctrl + E</div> <div class="csItem"><span class="csTitle">Recenter Topics around chosen Topic:</span> Alt + click on the topic OR Alt + E</div>
<div class="csItem"><span class="csTitle">Reveal the siblings for a Topic:</span> Right-click and choose 'Reveal siblings' OR Ctrl + R</div> <div class="csItem"><span class="csTitle">Reveal the siblings for a Topic:</span> Right-click and choose 'Reveal siblings' OR Alt + R</div>
<div class="csItem"><span class="csTitle">Center topic and reveal siblings:</span> Ctrl + T</div> <div class="csItem"><span class="csTitle">Center topic and reveal siblings:</span> Alt + T</div>
</div> </div>
<div id="csCreatingTopics"> <div id="csCreatingTopics">