diff options
Diffstat (limited to 'public/assets/javascripts/ui/editor/MediaViewer.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/MediaViewer.js | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/MediaViewer.js b/public/assets/javascripts/ui/editor/MediaViewer.js index 4ae6f97..e48c5b6 100644 --- a/public/assets/javascripts/ui/editor/MediaViewer.js +++ b/public/assets/javascripts/ui/editor/MediaViewer.js @@ -74,7 +74,6 @@ var MediaViewer = ModalView.extend({ if (typeof state != "boolean") { state = ! this.deleteIsArmed } - console.log(state) this.deleteIsArmed = state $("body").toggleClass("deleteArmed", state) }, @@ -102,3 +101,32 @@ var MediaViewer = ModalView.extend({ }, }) + +// function placeMedia(evt, img) { +// // JULES DO YO THANG +// alert('Place media at (' + evt.pageX + ', ' + evt.pageY + ')'); +// } +// +// $('.mediaContainer img').mousedown(function(e){ +// e.preventDefault() +// e.stopPropagation() +// }) +// $('.mediaContainer img').click(function (e) { +// e.stopPropagation() +// $(".mediaDrawer, .fileUpload, .addMedia").removeClass("active icon-close"); +// $floatingImg.attr('src', $(this).attr('src')); +// function _followCursor(e) { +// $floatingImg.parent().css({ +// top: (e.pageY - ($floatingImg.height() / 2)) + 'px', +// left: (e.pageX - ($floatingImg.width() / 2)) + 'px' +// }); +// } +// $(window).on('mousemove', _followCursor); +// $(window, this).one('click', function () { +// $floatingImg.attr('src', ''); +// $(window).off('mousemove', _followCursor); +// $floatingImg.parent().removeClass('edit'); +// }); +// $floatingImg.parent().addClass('edit'); +// _followCursor(e); +// }); |
