diff options
Diffstat (limited to 'public/assets/javascripts/ui/editor')
| -rw-r--r-- | public/assets/javascripts/ui/editor/LightControl.js | 21 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/MediaViewer.js | 30 |
2 files changed, 50 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/editor/LightControl.js b/public/assets/javascripts/ui/editor/LightControl.js index 1385820..20c3577 100644 --- a/public/assets/javascripts/ui/editor/LightControl.js +++ b/public/assets/javascripts/ui/editor/LightControl.js @@ -12,4 +12,25 @@ var LightControl = View.extend({ // $("body").removeClass("pastePaper"); }, +/* + $("#shadow-control").on({ + mousedown: function(){ app.dragging = true }, + change: function(){ + var hex = (~~($(this).int() / 100 * 0xff)).toString(10) + if (hex.length == 1) hex = "0" + hex; + var color = "rgba(" + [hex, hex, hex, "1.0"] + ")" + $(".face").css("border-color", color) + } + }) + + $("#brightness-control").on({ + mousedown: function(){ app.dragging = true }, + change: function(){ + var hex = (~~($(this).int() / 100 * 0xff)).toString(10) + var color = "rgba(" + [hex, hex, hex, "0.9"] + ")" + $("body,.face").css("background-color", color) + } + }) +*/ + }) 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); +// }); |
