X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/1eeef1dbdd63d9d1f468c00a8b35f4fe11d8c72f..6abfa75e909be774c2e52e3442c08507f64c1419:/skins/photo_lightbox_viewer.js?ds=inline diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index e7907ca..cffa157 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -468,9 +468,10 @@ Lightbox.prototype.onDragStart = function(evt) { var target = getTargetedObject(evt); this.dragged = target; this.draggedSelection = this.getSelectedSlides(); - this.draggedSelection.push(target); + if (this.draggedSelection.indexOf(target) === -1) { + this.draggedSelection.push(target); + } evt.dataTransfer.setData('text', ''); - var i, slide; for(i=0 ; i=0 ; i--) { + console.log(i); + slide = this.draggedSelection[i].cloneNode(true); + this.grid.insertBefore(slide, this.previousDragOver.nextSibling); + slide.style.opacity = 1; + slide.style.width = ''; + } } this.draggedSelection = this.previousDragOver = this.dragged = undefined; };