Skip to content

Commit 77b02cc

Browse files
authored
Merge pull request #670 from pierotofy/entwine
Entwine
2 parents 8408ccb + e553dea commit 77b02cc

File tree

309 files changed

+153139
-72500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+153139
-72500
lines changed

app/models/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,8 @@ def callback(progress):
572572
if len(info.output) > 0:
573573
self.console_output += "\n".join(info.output) + '\n'
574574

575-
# Update running progress
576-
self.running_progress = (info.progress / 100.0) * self.TASK_PROGRESS_LAST_VALUE
575+
# Update running progress
576+
self.running_progress = (info.progress / 100.0) * self.TASK_PROGRESS_LAST_VALUE
577577

578578
if info.last_error != "":
579579
self.last_error = info.last_error

app/static/app/js/ModelView.jsx

Lines changed: 127 additions & 331 deletions
Large diffs are not rendered by default.

app/static/app/js/components/AssetDownloadButtons.jsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,38 @@ class AssetDownloadButtons extends React.Component {
88
disabled: false,
99
direction: "down", // or "up",
1010
buttonClass: "btn-primary",
11-
task: null
11+
task: null,
12+
showLabel: true
1213
};
1314

1415
static propTypes = {
1516
disabled: PropTypes.bool,
1617
task: PropTypes.object.isRequired,
1718
direction: PropTypes.string,
18-
buttonClass: PropTypes.string
19+
buttonClass: PropTypes.string,
20+
showLabel: PropTypes.bool
1921
};
2022

2123
constructor(props){
2224
super();
23-
24-
this.downloadAsset = this.downloadAsset.bind(this);
25-
}
26-
27-
downloadAsset(asset){
28-
return (e) => {
29-
e.preventDefault();
30-
location.href = asset.downloadUrl(this.props.task.project, this.props.task.id)
31-
};
3225
}
3326

3427
render(){
3528
const assetDownloads = AssetDownloads.only(this.props.task.available_assets);
3629

37-
return (<div className={"asset-download-buttons btn-group " + (this.props.direction === "up" ? "dropup" : "")}>
30+
return (<div className={"asset-download-buttons " + (this.props.showLabel ? "btn-group" : "") + " " + (this.props.direction === "up" ? "dropup" : "")}>
3831
<button type="button" className={"btn btn-sm " + this.props.buttonClass} disabled={this.props.disabled} data-toggle="dropdown">
39-
<i className="glyphicon glyphicon-download"></i> Download Assets
32+
<i className="glyphicon glyphicon-download"></i>{this.props.showLabel ? " Download Assets" : ""}
4033
</button>
34+
{this.props.showLabel ?
4135
<button type="button" className={"btn btn-sm dropdown-toggle " + this.props.buttonClass} data-toggle="dropdown" disabled={this.props.disabled}>
4236
<span className="caret"></span>
43-
</button>
37+
</button> : ""}
4438
<ul className="dropdown-menu">
4539
{assetDownloads.map((asset, i) => {
4640
if (!asset.separator){
4741
return (<li key={i}>
48-
<a href="javascript:void(0);" onClick={this.downloadAsset(asset)}><i className={asset.icon + " fa-fw"}></i> {asset.label}</a>
42+
<a href={asset.downloadUrl(this.props.task.project, this.props.task.id)}><i className={asset.icon + " fa-fw"}></i> {asset.label}</a>
4943
</li>);
5044
}else{
5145
return (<li key={i} className="divider"></li>);

app/static/app/js/css/AssetDownloadButtons.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,16 @@
22
display: inline-block;
33
button{
44
margin-right: 0 !important;
5+
i{
6+
left: 2px;
7+
}
8+
}
9+
10+
&.btn-group{
11+
button{
12+
i{
13+
left: auto;
14+
}
15+
}
516
}
617
}

app/static/app/js/css/ModelView.scss

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
@import '../vendor/potree/js/potree.css';
2-
@import '../vendor/potree/js/jquery-ui.css';
1+
@import '../vendor/potree/build/potree.css';
2+
@import '../vendor/potree/libs/jquery-ui.css';
3+
@import '../vendor/potree/libs/themes/mixed/style.css';
34

45
.model-view{
56
position: relative;
@@ -51,10 +52,6 @@
5152
color: #7a8184;
5253
}
5354

54-
.switchModeButton{
55-
position: initial;
56-
}
57-
5855
.asset-download-buttons{
5956
margin-right: 8px;
6057
&.open{
@@ -64,14 +61,26 @@
6461
}
6562
}
6663

67-
.action-buttons-row{
68-
margin-top: 12px;
64+
}
65+
.model-action-buttons{
66+
position: absolute;
67+
z-index: 1;
68+
bottom: 12px;
69+
right: 6px;
6970

70-
& > *{
71-
display: inline-block;
72-
margin-right: 8px;
71+
.switchModeButton{
72+
position: initial;
73+
}
74+
.asset-download-buttons{
75+
.dropdown-menu{
76+
left: -100%;
7377
}
7478
}
79+
80+
& > *{
81+
display: inline-block;
82+
margin-right: 8px;
83+
}
7584
}
7685

7786

@@ -85,6 +94,27 @@
8594
display: none
8695
}
8796

97+
#potree_menu{
98+
input{
99+
color: buttontext;
100+
}
101+
legend{
102+
display: initial !important;
103+
width: initial !important;
104+
padding: initial !important;
105+
margin-bottom: initial !important;
106+
font-size: inherit !important;
107+
line-height: initial !important;
108+
color: inherit !important;
109+
border: initial !important;
110+
border-bottom: initial !important;
111+
}
112+
113+
#show_2d_profile{
114+
color: initial !important;
115+
}
116+
}
117+
88118
#potree_map_header{
89119
position: absolute;
90120
width: 100%;

app/static/app/js/tests/ModelView.test.jsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/static/app/js/vendor/MTLLoader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* @author angelxuanchang
55
*/
6-
var THREE = require('./potree/js/three');
76
function MTLLoader( manager ) {
87

98
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;

app/static/app/js/vendor/OBJLoader.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
22
* @author mrdoob / http://mrdoob.com/
33
*/
4-
var THREE = require('./potree/js/three');
5-
64
THREE.OBJLoader = function ( manager ) {
75

86
this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;

app/static/app/js/vendor/potree.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
import Potree from './potree/js/potree';
2-
export default Potree;
1+
export * from './potree/src/Potree';

app/static/app/js/vendor/potree/LICENSE.txt renamed to app/static/app/js/vendor/potree/LICENSE

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
1+
22
============
33
== POTREE ==
44
============
55

66
http://potree.org
77

8-
Copyright (c) 2011-2017, Markus Sch�tz
8+
Copyright (c) 2011-2017, Markus Schütz
99
All rights reserved.
1010

1111
Redistribution and use in source and binary forms, with or without
@@ -42,21 +42,3 @@ http://plas.io/
4242
The MIT License (MIT)
4343

4444
Copyright (c) 2014 Uday Verma, [email protected]
45-
46-
Permission is hereby granted, free of charge, to any person obtaining a copy
47-
of this software and associated documentation files (the "Software"), to deal
48-
in the Software without restriction, including without limitation the rights
49-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
50-
copies of the Software, and to permit persons to whom the Software is
51-
furnished to do so, subject to the following conditions:
52-
53-
The above copyright notice and this permission notice shall be included in
54-
all copies or substantial portions of the Software.
55-
56-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
59-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
60-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
61-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
62-
THE SOFTWARE.

0 commit comments

Comments
 (0)