Skip to content

Commit

Permalink
StyleCode
Browse files Browse the repository at this point in the history
  • Loading branch information
BorodinDK committed Dec 4, 2018
1 parent 0176902 commit 06e1cb1
Show file tree
Hide file tree
Showing 27 changed files with 231 additions and 207 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- '5.4.0'
- '10.0.0'
1 change: 1 addition & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"stack": "heroku-18",
"name": "tour-player",
"scripts": {},
"env": {},
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tour-player",
"dependencies": {
"threejs": "latest"
"threejs": "r93"
},
"overrides": {
"threejs": {
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ gulp.task('deploy', function() {
}));
});

gulp.task('lint', ['jslint', 'jscs','stylint']);
gulp.task('lint', ['jscs','stylint']);
gulp.task('build', ['clean', 'clear', 'mainBowerFiles'], function() {
gulp.run(['scripts', 'styles']);
});
Expand Down
6 changes: 3 additions & 3 deletions src/css/gallery.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
width 200px
left -200px
height 100%
background rgba(0,0,0,.8)
background rgba(0, 0, 0, .8)
z-index 2
transition left.3s ease
will-change left
Expand All @@ -14,7 +14,7 @@
.gallery-toggler
cursor pointer
position absolute
background rgba(0,0,0,.8)
background rgba(0, 0, 0, .8)
top 0
bottom 0
margin auto 0
Expand Down Expand Up @@ -80,7 +80,7 @@
position absolute
bottom 0
margin 0
background linear-gradient(to top,rgba(0,0,0,0.5) 40%, transparent)
background linear-gradient(to top, rgba(0, 0, 0, .5) 40%, transparent)
color white
padding 24px 10px 8px
white-space nowrap
Expand Down
5 changes: 2 additions & 3 deletions src/css/markers.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $arrow-size = 8px
height 100%
top 0
left 0

.marker
position absolute
height $marker-size
Expand Down Expand Up @@ -37,7 +37,7 @@ $arrow-size = 8px
&:hover
transition transform .2s ease
transform scale(1.15)

&.left
background-image embedurl("../img/markers/left.svg", "utf8")
&.right
Expand Down Expand Up @@ -123,7 +123,6 @@ $arrow-size = 8px
border-right none
border-left $arrow-size solid white

#markers
.marker:hover
.title
$title-padding = $arrow-size * 1.5
Expand Down
6 changes: 3 additions & 3 deletions src/js/Tools/copyDirectionMarker.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* globals Tools */

Tools.copyDirectionMarker = function(id, lat) {
console.info('Pano id:', Tour.view.id)
console.info('Pano id:', Tour.view.id);
var code = JSON.stringify({
lat: lat || parseFloat(Tour.view.lat.value.toFixed(2)),
lon: parseFloat(Tour.view.lon.value.toFixed(2)),
icon: Tools.point.icon,
action:{type:'panorama', id:id}
}, null, "");
action: { type: 'panorama', id: id }
}, null, '');

Tour.controls.copyText(code);
};
17 changes: 12 additions & 5 deletions src/js/Tools/copyInfoMarker.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/* globals Tools */

Tools.copyInfoMarker = function(title, id) {
console.info('Pano id:', Tour.view.id)
console.info('Pano id:', Tour.view.id);

var marker = {
lat: parseFloat(Tour.view.lat.value.toFixed(2)),
lon: parseFloat(Tour.view.lon.value.toFixed(2)),
lon: parseFloat(Tour.view.lon.value.toFixed(2))
};

if (title) {
marker.title = title;
}
if (title) marker.title = title;
if (id) marker.action = {type:'popup', id:id};
var code = JSON.stringify(marker, null, "");
if (id) {
marker.action = { type: 'popup', id: id };
}

var code = JSON.stringify(marker, null, '');

Tour.controls.copyText(code);
};
14 changes: 7 additions & 7 deletions src/js/Tools/copyMarker.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* globals Tools */

Tools.copyMarker = function(id) {
if(this.point.icon == 'info'){
this.copyInfoMarker(
prompt('Enter title for info marker', 'title'),
prompt('Enter popup id', '')
);
Tools.copyMarker = function() {
if (this.point.icon == 'info') {
this.copyInfoMarker(
prompt('Enter title for info marker', 'title'),
prompt('Enter popup id', '')
);
} else {
this.copyDirectionMarker(prompt('Enter pano id', Tour.view.id));
this.copyDirectionMarker(prompt('Enter pano id', Tour.view.id));
}
};
17 changes: 9 additions & 8 deletions src/js/Tools/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Tools.init = function() {
this.setPoint();
window.addEventListener('keydown', function(event) {
if(event.keyCode == 13){ //Enter
if (event.keyCode == 13) { //Enter
Tools.copyMarker();
}

Expand All @@ -15,14 +15,15 @@ Tools.init = function() {
});

new UI.mouseMenu.Hr();
new UI.mouseMenu.Item(Tools.copyLon, 'Copy lon', '1')
new UI.mouseMenu.Item(Tools.meshEditor, 'Mesh editor', '2')
new UI.mouseMenu.Item(Tools.copyLon, 'Copy lon', '1');
new UI.mouseMenu.Item(Tools.meshEditor, 'Mesh editor', '2');

this.meshEditor()
Tour.view.fov.min = 5; Tour.view.fov.max = 130;
};
this.meshEditor();

Tour.view.fov.min = 5;
Tour.view.fov.max = 130;
};

Tools.copyLon = function(){
Tools.copyLon = function() {
Tour.controls.copyText(parseFloat(Tour.view.get().lon.toFixed(2)));
}
};
Loading

0 comments on commit 06e1cb1

Please sign in to comment.