CTRL-dragging now copies spells

This commit is contained in:
Jacob
2017-07-26 19:54:18 +01:00
parent 3599b5fbc4
commit 53afaa4f37
2 changed files with 59 additions and 24 deletions

View File

@@ -352,7 +352,11 @@ Template.layout.events({
"drop .spellList": function(event, instance){
var spellId = event.originalEvent.dataTransfer.getData("dicecloud-id/spells");
//move spell to new list
Meteor.call("moveSpellToList", spellId, this._id);
if (event.ctrlKey){
Meteor.call("copySpellToList", spellId, this._id);
} else {
Meteor.call("moveSpellToList", spellId, this._id);
}
Session.set("inventory.dragSpellId", null);
},
});