Skip to content

Instantly share code, notes, and snippets.

@unlucio
Forked from emadb/gist:38cf4c94ac858382300c
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unlucio/0bd7f7c8b456fd768f5a to your computer and use it in GitHub Desktop.
Save unlucio/0bd7f7c8b456fd768f5a to your computer and use it in GitHub Desktop.
function mouseup(evt) {
var contentList = this.cont.list;
var [start, end] = [contentList.indexOf(_lastItemSelected), contentList.indexOf(this)].sort();
if (_isDD) {
return;
}
if (evt.shiftKey == true) {
for (var i = start; i <= end ; i++) {
this.selectItem(contentList[i]);
}
} else {
if (this.elem.hasClassName('mkdd-selected')) {
this.elem.removeClassName('mkdd-selected');
} else {
this.selectItem(this);
}
}
_lastItemSelected = this;
this.isMouseup = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment