merge with upstream master
This commit is contained in:
@@ -1,22 +1,26 @@
|
||||
let AutoUpload = () => {
|
||||
$("#file_upload").change((e) => {
|
||||
var ten_megabyte_max_upload = 10000000;
|
||||
$("#error_container_txt").empty();
|
||||
if(e.currentTarget.files[0].size < ten_megabyte_max_upload){
|
||||
e.currentTarget.form.submit();
|
||||
}else{
|
||||
$("#error_container_txt").append('<span class="error_message centered_error" id="error_message_txt">The system configuration you have uploaded is too large. Try splitting your design into two separate text files and run the tool twice.</span>');
|
||||
}
|
||||
var ten_megabyte_max_upload = 10000000;
|
||||
$("#error_container_txt").empty();
|
||||
if (e.currentTarget.files[0].size < ten_megabyte_max_upload) {
|
||||
// $('#spinner-panel').show();
|
||||
$('#spinner-panel').css('width', '100%'); // Workaround for Safari issue
|
||||
e.currentTarget.form.submit();
|
||||
} else {
|
||||
$("#error_container_txt").append('<span class="error_message centered_error" id="error_message_txt">The system configuration you have uploaded is too large. Try splitting your design into two separate text files and run the tool twice.</span>');
|
||||
}
|
||||
});
|
||||
|
||||
$("#dxf_upload").change((e) => {
|
||||
var ten_megabyte_max_upload = 10000000;
|
||||
$("#error_container_dxf").empty();
|
||||
if(e.currentTarget.files[0].size < ten_megabyte_max_upload){
|
||||
e.currentTarget.form.submit();
|
||||
}else{
|
||||
$("#error_container_dxf").append('<span class="error_message centered_error" id="error_message_dxf">The system configuration you have uploaded is too large. Try splitting your design into two separate text files and run the tool twice.</span>');
|
||||
}
|
||||
var ten_megabyte_max_upload = 10000000;
|
||||
$("#error_container_dxf").empty();
|
||||
if (e.currentTarget.files[0].size < ten_megabyte_max_upload) {
|
||||
// $('#spinner-panel').show();
|
||||
$('#spinner-panel').css('width', '100%'); // Workaround for Safari issue
|
||||
e.currentTarget.form.submit();
|
||||
} else {
|
||||
$("#error_container_dxf").append('<span class="error_message centered_error" id="error_message_dxf">The system configuration you have uploaded is too large. Try splitting your design into two separate text files and run the tool twice.</span>');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -8,13 +8,16 @@ import AutoUpload from './auto_upload';
|
||||
|
||||
$(document).ready(function () {
|
||||
AutoUpload();
|
||||
let subarrayDisplay = new SubarrayDisplay();
|
||||
subarrayDisplay.init($('#current_anchors'), $('#needed_anchors'), $('#subarray_weight'), panel_data);
|
||||
let arrayVisualization = new ArrayVisualization(panel_data, is_dual_tilt, subarrayDisplay, buildings_coordinates);
|
||||
arrayVisualization.init();
|
||||
new ZoomControl(arrayVisualization).init($('#zoom_control'));
|
||||
new OverlayControl(arrayVisualization).init($('#overlay_control'), $('#legend_container'));
|
||||
new SeismicControl(arrayVisualization, subarrayDisplay).init($('.seismic_anchor_control'), $("#seismic_save"));
|
||||
window.arrayVisualization = arrayVisualization;
|
||||
|
||||
if (is_csv_available) {
|
||||
let subarrayDisplay = new SubarrayDisplay();
|
||||
subarrayDisplay.init($('#current_anchors'), $('#needed_anchors'), $('#subarray_weight'), panel_data);
|
||||
let arrayVisualization = new ArrayVisualization(panel_data, is_dual_tilt, subarrayDisplay, buildings_coordinates);
|
||||
arrayVisualization.init();
|
||||
new ZoomControl(arrayVisualization).init($('#zoom_control'));
|
||||
new OverlayControl(arrayVisualization).init($('#overlay_control'), $('#legend_container'));
|
||||
new SeismicControl(arrayVisualization, subarrayDisplay).init($('.seismic_anchor_control'), $("#seismic_save"));
|
||||
window.arrayVisualization = arrayVisualization;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user