1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-25 12:47:40 +00:00

Droppable widget - passing modifiers as variables (#3167)

* pass the modifier keys as variables

* Update DroppableWidget.tid

* Create modifier Variable.tid

* closing bracket got lost
This commit is contained in:
BurningTreeC
2018-03-14 18:52:13 +01:00
committed by Jeremy Ruston
parent de6e0d1c1e
commit c9b8319801
3 changed files with 21 additions and 2 deletions

View File

@@ -128,7 +128,9 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
DroppableWidget.prototype.performActions = function(title,event) {
if(this.droppableActions) {
this.invokeActionString(this.droppableActions,this,event,{actionTiddler: title});
var modifierKey = event.ctrlKey && ! event.shiftKey ? "ctrl" : event.shiftKey && !event.ctrlKey ? "shift" :
event.ctrlKey && event.shiftKey ? "ctrl-shift" : "normal" ;
this.invokeActionString(this.droppableActions,this,event,{actionTiddler: title, modifier: modifierKey});
}
};