Skip to content

Commit

Permalink
Merge pull request #670 from pierotofy/entwine
Browse files Browse the repository at this point in the history
Entwine
  • Loading branch information
pierotofy authored Jun 8, 2019
2 parents 8408ccb + e553dea commit 77b02cc
Show file tree
Hide file tree
Showing 309 changed files with 153,139 additions and 72,500 deletions.
4 changes: 2 additions & 2 deletions app/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def callback(progress):
if len(info.output) > 0:
self.console_output += "\n".join(info.output) + '\n'

# Update running progress
self.running_progress = (info.progress / 100.0) * self.TASK_PROGRESS_LAST_VALUE
# Update running progress
self.running_progress = (info.progress / 100.0) * self.TASK_PROGRESS_LAST_VALUE

if info.last_error != "":
self.last_error = info.last_error
Expand Down
458 changes: 127 additions & 331 deletions app/static/app/js/ModelView.jsx

Large diffs are not rendered by default.

24 changes: 9 additions & 15 deletions app/static/app/js/components/AssetDownloadButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,38 @@ class AssetDownloadButtons extends React.Component {
disabled: false,
direction: "down", // or "up",
buttonClass: "btn-primary",
task: null
task: null,
showLabel: true
};

static propTypes = {
disabled: PropTypes.bool,
task: PropTypes.object.isRequired,
direction: PropTypes.string,
buttonClass: PropTypes.string
buttonClass: PropTypes.string,
showLabel: PropTypes.bool
};

constructor(props){
super();

this.downloadAsset = this.downloadAsset.bind(this);
}

downloadAsset(asset){
return (e) => {
e.preventDefault();
location.href = asset.downloadUrl(this.props.task.project, this.props.task.id)
};
}

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

return (<div className={"asset-download-buttons btn-group " + (this.props.direction === "up" ? "dropup" : "")}>
return (<div className={"asset-download-buttons " + (this.props.showLabel ? "btn-group" : "") + " " + (this.props.direction === "up" ? "dropup" : "")}>
<button type="button" className={"btn btn-sm " + this.props.buttonClass} disabled={this.props.disabled} data-toggle="dropdown">
<i className="glyphicon glyphicon-download"></i> Download Assets
<i className="glyphicon glyphicon-download"></i>{this.props.showLabel ? " Download Assets" : ""}
</button>
{this.props.showLabel ?
<button type="button" className={"btn btn-sm dropdown-toggle " + this.props.buttonClass} data-toggle="dropdown" disabled={this.props.disabled}>
<span className="caret"></span>
</button>
</button> : ""}
<ul className="dropdown-menu">
{assetDownloads.map((asset, i) => {
if (!asset.separator){
return (<li key={i}>
<a href="javascript:void(0);" onClick={this.downloadAsset(asset)}><i className={asset.icon + " fa-fw"}></i> {asset.label}</a>
<a href={asset.downloadUrl(this.props.task.project, this.props.task.id)}><i className={asset.icon + " fa-fw"}></i> {asset.label}</a>
</li>);
}else{
return (<li key={i} className="divider"></li>);
Expand Down
11 changes: 11 additions & 0 deletions app/static/app/js/css/AssetDownloadButtons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
display: inline-block;
button{
margin-right: 0 !important;
i{
left: 2px;
}
}

&.btn-group{
button{
i{
left: auto;
}
}
}
}
52 changes: 41 additions & 11 deletions app/static/app/js/css/ModelView.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import '../vendor/potree/js/potree.css';
@import '../vendor/potree/js/jquery-ui.css';
@import '../vendor/potree/build/potree.css';
@import '../vendor/potree/libs/jquery-ui.css';
@import '../vendor/potree/libs/themes/mixed/style.css';

.model-view{
position: relative;
Expand Down Expand Up @@ -51,10 +52,6 @@
color: #7a8184;
}

.switchModeButton{
position: initial;
}

.asset-download-buttons{
margin-right: 8px;
&.open{
Expand All @@ -64,14 +61,26 @@
}
}

.action-buttons-row{
margin-top: 12px;
}
.model-action-buttons{
position: absolute;
z-index: 1;
bottom: 12px;
right: 6px;

& > *{
display: inline-block;
margin-right: 8px;
.switchModeButton{
position: initial;
}
.asset-download-buttons{
.dropdown-menu{
left: -100%;
}
}

& > *{
display: inline-block;
margin-right: 8px;
}
}


Expand All @@ -85,6 +94,27 @@
display: none
}

#potree_menu{
input{
color: buttontext;
}
legend{
display: initial !important;
width: initial !important;
padding: initial !important;
margin-bottom: initial !important;
font-size: inherit !important;
line-height: initial !important;
color: inherit !important;
border: initial !important;
border-bottom: initial !important;
}

#show_2d_profile{
color: initial !important;
}
}

#potree_map_header{
position: absolute;
width: 100%;
Expand Down
11 changes: 0 additions & 11 deletions app/static/app/js/tests/ModelView.test.jsx

This file was deleted.

1 change: 0 additions & 1 deletion app/static/app/js/vendor/MTLLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* @author angelxuanchang
*/
var THREE = require('./potree/js/three');
function MTLLoader( manager ) {

this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
Expand Down
2 changes: 0 additions & 2 deletions app/static/app/js/vendor/OBJLoader.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* @author mrdoob / http://mrdoob.com/
*/
var THREE = require('./potree/js/three');

THREE.OBJLoader = function ( manager ) {

this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
Expand Down
3 changes: 1 addition & 2 deletions app/static/app/js/vendor/potree.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
import Potree from './potree/js/potree';
export default Potree;
export * from './potree/src/Potree';
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

============
== POTREE ==
============

http://potree.org

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

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

Copyright (c) 2014 Uday Verma, [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 77b02cc

Please sign in to comment.