diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index b0ab3b19..4c349247 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -1369,8 +1369,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1369 | targetIndex = 0, | 1369 | targetIndex = 0, |
1370 | isAlreadySelected = false, | 1370 | isAlreadySelected = false, |
1371 | indexAlreadySelected = 0, | 1371 | indexAlreadySelected = 0, |
1372 | indexLastClicked = 0; | 1372 | indexLastClicked = 0, |
1373 | 1373 | ua = navigator.userAgent.toLowerCase(), | |
1374 | boolCommandControlKeyIsPressed = false; | ||
1375 | |||
1376 | // Check to see if either the Command key (macs) or Control key (windows) is being pressed | ||
1377 | if (ua.indexOf("mac") > -1) { | ||
1378 | if (event.metaKey === true) { | ||
1379 | boolCommandControlKeyIsPressed = true; | ||
1380 | } | ||
1381 | } else { | ||
1382 | if (this._isControlPressed === true) { | ||
1383 | boolCommandControlKeyIsPressed = true; | ||
1384 | } | ||
1385 | } | ||
1386 | |||
1374 | // Did the mousedown event originate within a layer? | 1387 | // Did the mousedown event originate within a layer? |
1375 | if (ptrParent === false) { | 1388 | if (ptrParent === false) { |
1376 | // No it did not. Do nothing. | 1389 | // No it did not. Do nothing. |
@@ -1406,8 +1419,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1406 | } else { | 1419 | } else { |
1407 | // Something is already selected. What do do depends on whether | 1420 | // Something is already selected. What do do depends on whether |
1408 | // or not other keys are pressed. | 1421 | // or not other keys are pressed. |
1409 | if (this._isControlPressed === true) { | 1422 | if (boolCommandControlKeyIsPressed === true) { |
1410 | // Control key is being pressed, so we need to | 1423 | // Control or Command key is being pressed, so we need to |
1411 | // either add the current layer to selectedLayers | 1424 | // either add the current layer to selectedLayers |
1412 | // or remove it if it's already there. | 1425 | // or remove it if it's already there. |
1413 | if (this.currentLayersSelected === false) { | 1426 | if (this.currentLayersSelected === false) { |
@@ -1467,9 +1480,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1467 | // Control key has been pressed | 1480 | // Control key has been pressed |
1468 | this._isControlPressed = true; | 1481 | this._isControlPressed = true; |
1469 | } | 1482 | } |
1483 | /* | ||
1470 | if (event.metaKey === true) { | 1484 | if (event.metaKey === true) { |
1471 | this._isControlPressed = true; | 1485 | this._isControlPressed = true; |
1472 | } | 1486 | } |
1487 | */ | ||
1473 | } | 1488 | } |
1474 | }, | 1489 | }, |
1475 | 1490 | ||