From 9cb3a0a7ce2a6660a776e1bd48053ca963eb7b92 Mon Sep 17 00:00:00 2001 From: ryderr Date: Tue, 4 Nov 2014 13:56:14 -0500 Subject: disable wow js in mobile --- public/assets/javascripts/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'public/assets/javascripts/app.js') diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index f3da470..5e339ea 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -13,11 +13,9 @@ else if ($.browser.msie || ! has3d()) { } else { $("html").addClass("desktop"); + new WOW().init() } -$(function(){ - new WOW().init() -}) var scene, cam, map; -- cgit v1.2.3-70-g09d2 From 00778a168b7314039e95e856f6d41e05d0dbc4e4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 4 Nov 2014 14:44:02 -0500 Subject: fix resize undo --- public/assets/javascripts/app.js | 5 ----- .../assets/javascripts/rectangles/engine/scenery/types/image.js | 1 + .../assets/javascripts/rectangles/engine/scenery/types/text.js | 2 ++ .../assets/javascripts/rectangles/engine/scenery/types/video.js | 1 + public/assets/javascripts/rectangles/engine/scenery/undo.js | 9 ++++++--- public/assets/javascripts/rectangles/models/vec2.js | 6 +++++- public/assets/javascripts/vendor/polyfill.js | 5 +++++ 7 files changed, 20 insertions(+), 9 deletions(-) (limited to 'public/assets/javascripts/app.js') diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 5e339ea..0488f11 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -1,9 +1,4 @@ -var is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)); -var is_ipad = (navigator.userAgent.match(/iPad/i)); -var is_android = (navigator.userAgent.match(/Android/i)) -var is_mobile = is_iphone || is_ipad || is_android; - if (is_mobile) { // window.location.href = "mobile.html" $("html").addClass("mobile"); diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/image.js b/public/assets/javascripts/rectangles/engine/scenery/types/image.js index 10fc917..848f8d4 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/types/image.js +++ b/public/assets/javascripts/rectangles/engine/scenery/types/image.js @@ -55,6 +55,7 @@ Scenery.types.image = Scenery.types.base.extend(function(base){ this.mx.move(data.position) this.mx.ops.width = data.dimensions.a this.mx.ops.height = data.dimensions.b + this.dimensions.deserialize(data.dimensions) }, } diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/text.js b/public/assets/javascripts/rectangles/engine/scenery/types/text.js index a10a332..dd1385f 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/types/text.js +++ b/public/assets/javascripts/rectangles/engine/scenery/types/text.js @@ -68,7 +68,9 @@ Scenery.types.text = Scenery.types.base.extend(function(base){ this.mx.move(data.position) this.mx.ops.width = data.dimensions.a this.mx.ops.height = data.dimensions.b + this.dimensions.deserialize(data.dimensions) }, + } return exports diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/video.js b/public/assets/javascripts/rectangles/engine/scenery/types/video.js index a669a90..d83cc63 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/types/video.js +++ b/public/assets/javascripts/rectangles/engine/scenery/types/video.js @@ -117,6 +117,7 @@ Scenery.types.video = Scenery.types.base.extend(function(base){ this.mx.move(data.position) this.mx.ops.width = data.dimensions.a this.mx.ops.height = data.dimensions.b + this.dimensions.deserialize(data.dimensions) }, } diff --git a/public/assets/javascripts/rectangles/engine/scenery/undo.js b/public/assets/javascripts/rectangles/engine/scenery/undo.js index 998f7c6..6ad9e0d 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/undo.js +++ b/public/assets/javascripts/rectangles/engine/scenery/undo.js @@ -21,9 +21,10 @@ type: "update-scenery", undo: function(state){ var scenery = Scenery.find(state.id) + var wall = Walls.find( state.wall_id ) scenery.deserialize(state) - scenery.set_wall(Walls.find( state.wall_id )) + scenery.set_wall({ wall: wall }) if (editor.permissions.resize) { Scenery.resize.show(scenery) @@ -34,13 +35,15 @@ }, redo: function(state){ var scenery = Scenery.find(state.id) + var wall = Walls.find( state.wall_id ) + scenery.deserialize(state) - scenery.set_wall(Walls.find( state.wall_id )) + scenery.set_wall({ wall: wall }) if (editor.permissions.resize) { Scenery.resize.show(scenery) - Scenery.resize.rotate_dots() Scenery.resize.move_dots() + Scenery.resize.rotate_dots() } // TODO: watch individual scenery object here diff --git a/public/assets/javascripts/rectangles/models/vec2.js b/public/assets/javascripts/rectangles/models/vec2.js index f28df54..14d0e6b 100644 --- a/public/assets/javascripts/rectangles/models/vec2.js +++ b/public/assets/javascripts/rectangles/models/vec2.js @@ -206,7 +206,11 @@ return "[" + this.a + " " + this.b + "]" } vec2.prototype.serialize = function(){ - return [ ~~this.a, ~~this.b ] + return [ round(this.a), round(this.b) ] + } + vec2.prototype.deserialize = function(data){ + this.a = data[0] + this.b = data[1] } vec2.prototype.quantize = function(n){ n = n || 10 diff --git a/public/assets/javascripts/vendor/polyfill.js b/public/assets/javascripts/vendor/polyfill.js index f97e438..8e4b9dc 100644 --- a/public/assets/javascripts/vendor/polyfill.js +++ b/public/assets/javascripts/vendor/polyfill.js @@ -52,6 +52,11 @@ function has3d(){ return browser; })( navigator.userAgent ); +// Naive useragent detection pattern +var is_iphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)); +var is_ipad = (navigator.userAgent.match(/iPad/i)); +var is_android = (navigator.userAgent.match(/Android/i)) +var is_mobile = is_iphone || is_ipad || is_android; // rAF shim (function() { -- cgit v1.2.3-70-g09d2 From 80c731a0d0f10db6891364ecd0cf3afcee288cb1 Mon Sep 17 00:00:00 2001 From: ryderr Date: Wed, 5 Nov 2014 11:33:51 -0500 Subject: copy --- public/assets/javascripts/app.js | 1 - public/assets/stylesheets/app.css | 6 ++++++ views/controls/editor/settings.ejs | 4 ++-- views/home.ejs | 10 +++++----- views/partials/footer.ejs | 2 +- views/partials/meta.ejs | 2 +- views/partials/scripts.ejs | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) (limited to 'public/assets/javascripts/app.js') diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 0488f11..b4eb9e6 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -8,7 +8,6 @@ else if ($.browser.msie || ! has3d()) { } else { $("html").addClass("desktop"); - new WOW().init() } diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index c190f35..2303d3e 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -2339,6 +2339,8 @@ form li textarea { -webkit-transition:0.2s background; -moz-transition:0.2s background; transition:0.2s background; + position: relative; + z-index: 5; } .loading .hero .circle { @@ -2808,6 +2810,10 @@ a[data-role="forgot-password"] { .footer { padding:50px 0 120px 0; } + .videoModal .ion-ios7-close-empty { + right: 10px; + top: 20px; + } } @media screen and (orientation:portrait) { diff --git a/views/controls/editor/settings.ejs b/views/controls/editor/settings.ejs index 8443abb..0d8f325 100644 --- a/views/controls/editor/settings.ejs +++ b/views/controls/editor/settings.ejs @@ -10,9 +10,9 @@ Set Startpoint Move to Desired Point done - Startpoint Confirmed + Set Startpoint - (go there) + view current