mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Relax rules for using keyboard shortcuts in the walkthrough
This commit is contained in:
@@ -42,7 +42,6 @@ export function behaviorCopy(context) {
|
||||
|
||||
function doCopy() {
|
||||
d3.event.preventDefault();
|
||||
if (context.inIntro()) return;
|
||||
|
||||
var graph = context.graph(),
|
||||
selected = groupEntities(context.selectedIDs(), graph),
|
||||
|
||||
@@ -33,7 +33,7 @@ export function behaviorOperation(context) {
|
||||
|
||||
|
||||
var behavior = function () {
|
||||
if (which && which.available() && !context.inIntro()) {
|
||||
if (which && which.available()) {
|
||||
keybinding = d3keybinding('behavior.key.' + which.id);
|
||||
keybinding.on(which.keys, function() {
|
||||
d3.event.preventDefault();
|
||||
|
||||
@@ -39,7 +39,6 @@ export function behaviorPaste(context) {
|
||||
|
||||
function doPaste() {
|
||||
d3.event.preventDefault();
|
||||
if (context.inIntro()) return;
|
||||
|
||||
var baseGraph = context.graph(),
|
||||
mouse = context.mouse(),
|
||||
|
||||
+1
-3
@@ -255,9 +255,7 @@ export function uiInit(context) {
|
||||
function pan(d) {
|
||||
return function() {
|
||||
d3.event.preventDefault();
|
||||
if (!context.inIntro()) {
|
||||
context.pan(d, 100);
|
||||
}
|
||||
context.pan(d, 100);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ export function uiUndoRedo(context) {
|
||||
var commands = [{
|
||||
id: 'undo',
|
||||
cmd: uiCmd('⌘Z'),
|
||||
action: function() { if (!(context.inIntro() || saving())) context.undo(); },
|
||||
action: function() { if (!saving()) context.undo(); },
|
||||
annotation: function() { return context.history().undoAnnotation(); }
|
||||
}, {
|
||||
id: 'redo',
|
||||
cmd: uiCmd('⌘⇧Z'),
|
||||
action: function() {if (!(context.inIntro() || saving())) context.redo(); },
|
||||
action: function() { if (!saving()) context.redo(); },
|
||||
annotation: function() { return context.history().redoAnnotation(); }
|
||||
}];
|
||||
|
||||
|
||||
+4
-4
@@ -26,25 +26,25 @@ export function uiZoom(context) {
|
||||
|
||||
function zoomIn() {
|
||||
d3.event.preventDefault();
|
||||
if (!context.inIntro()) context.zoomIn();
|
||||
context.zoomIn();
|
||||
}
|
||||
|
||||
|
||||
function zoomOut() {
|
||||
d3.event.preventDefault();
|
||||
if (!context.inIntro()) context.zoomOut();
|
||||
context.zoomOut();
|
||||
}
|
||||
|
||||
|
||||
function zoomInFurther() {
|
||||
d3.event.preventDefault();
|
||||
if (!context.inIntro()) context.zoomInFurther();
|
||||
context.zoomInFurther();
|
||||
}
|
||||
|
||||
|
||||
function zoomOutFurther() {
|
||||
d3.event.preventDefault();
|
||||
if (!context.inIntro()) context.zoomOutFurther();
|
||||
context.zoomOutFurther();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user