diff options
| author | ryderr <r@okfoc.us> | 2014-10-08 16:42:09 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-10-08 16:42:09 -0400 |
| commit | 8c73961bd4974aa0f84834eca9581fc402ce3537 (patch) | |
| tree | 69f001c794cdd33491329a5e5660fd25d1141558 | |
| parent | e24d96de91b4dc2e87d56f5e12d5dddc806c4618 (diff) | |
| parent | 5b12dd422167c5aaf210d49d57b78312eb209b94 (diff) | |
Merge branch 'master' of github.com:okfocus/vvalls
| -rw-r--r-- | public/assets/javascripts/rectangles/engine/map/ui_editor.js | 2 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/site/ProjectList.js | 20 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 13 | ||||
| -rw-r--r-- | views/projects/list-projects.ejs | 6 |
4 files changed, 32 insertions, 9 deletions
diff --git a/public/assets/javascripts/rectangles/engine/map/ui_editor.js b/public/assets/javascripts/rectangles/engine/map/ui_editor.js index f9334e6..02218ed 100644 --- a/public/assets/javascripts/rectangles/engine/map/ui_editor.js +++ b/public/assets/javascripts/rectangles/engine/map/ui_editor.js @@ -50,7 +50,7 @@ Map.UI.Editor = function(map){ return r.focused = r.rect.contains(cursor.x.a, cursor.y.a) }) - if (intersects.length && base.permissions.destroy) { + if (intersects.length && (base.permissions.destroy || e.altKey)) { base.mouse.down = false room = intersects[0] diff --git a/public/assets/javascripts/ui/site/ProjectList.js b/public/assets/javascripts/ui/site/ProjectList.js index 993d805..149cd41 100644 --- a/public/assets/javascripts/ui/site/ProjectList.js +++ b/public/assets/javascripts/ui/site/ProjectList.js @@ -4,13 +4,28 @@ var ProjectList = View.extend({ el: ".projectList", events: { - "mouseenter .room": 'spinOn', - "mouseleave .room": 'spinOff', + "mouseenter .room": 'enter', + "mouseleave .room": 'leave', }, initialize: function(){ }, + timeout: null, + enter: function(){ + clearTimeout(this.timeout) + this.advance() + }, + + leave: function(){ + clearTimeout(this.timeout) + }, + + advance: function(){ + this.timeout = setTimeout(this.advance.bind(this), 500) + } + +/* spinOn: function(e){ var iframe = $(e.currentTarget).find("iframe").get('0') if (! iframe) return @@ -22,5 +37,6 @@ var ProjectList = View.extend({ if (! iframe) return iframe.contentWindow.postMessage("spin-off", window.location.origin) } +*/ }) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index eebe6eb..d384dea 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -360,17 +360,23 @@ iframe.embed { .room .images { position: absolute; top: 0; left: 0; - z-index: 2; + z-index: -1; width: 100%; height: 100%; text-align: center; overflow: hidden; } -.room .images img { - width: 30%; +.room .images div { position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-size: cover; + background-position: center center; } +/* .room .images[data-mediacount='1'] img:nth-child(1) { left: 20%; top: 20%; } .room .images[data-mediacount='2'] img:nth-child(1) { left: 51%; bottom: 0%; width: auto; height: 40%; } @@ -384,6 +390,7 @@ iframe.embed { .room .images[data-mediacount='4'] img:nth-child(2) { left: 51%; bottom: 61%; } .room .images[data-mediacount='4'] img:nth-child(3) { right: 51%; top: 61%; } .room .images[data-mediacount='4'] img:nth-child(4) { left: 51%; top: 41%; } +*/ .page .btn { clear: both; diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index 45b73e2..c47dee0 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -13,12 +13,12 @@ <span class="room" style="background-color: rgb([[- project.color ]]);"> <span class="mask" style="background-image: url([[- project.photo ]]);"> </span> - <span class="images" data-mediaCount="[[- Math.min(project.media.length, 3) ]]"> + <span class="images" data-mediaCount="[[- Math.min(project.media.length, 4) ]]"> [[ mediaCount = 0 ]] [[ project.media.some(function(media){ ]] [[ if (media.media.type != "image") { return false } ]] - [[ if (++mediaCount > 3) { return true } ]] - <img src="[[- media.media.url ]]"> + [[ if (++mediaCount > 4) { return true } ]] + <div style="background-image:url([[- media.media.url ]])"></div> [[ }) ]] </span> </span> |
