Skip to content

Commit

Permalink
Fix incorrect time on Leaflet map info popup.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcjohns committed Jul 31, 2023
1 parent 2a1e7ca commit b6a707d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ endif(USE_GOOGLE_MAP)
if(USE_LEAFLET_MAP)
list(APPEND sources src/LeafletRadMap.cpp)
list(APPEND headers InterSpec/LeafletRadMap.h)
list(APPEND OTHER_InterSpec_SUPPORT_FILES InterSpec_resources/LeafletRadMap.js)
endif(USE_LEAFLET_MAP)

if(USE_SEARCH_MODE_3D_CHART)
Expand Down Expand Up @@ -568,7 +569,7 @@ deploy_js_resource("${CMAKE_CURRENT_SOURCE_DIR}/external_libs/SpecUtils/d3_resou



list( APPEND OTHER_SUPPORT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/D3TimeChart.js )
list( APPEND OTHER_InterSpec_SUPPORT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/D3TimeChart.js )

deploy_js_resource("${CMAKE_CURRENT_SOURCE_DIR}/external_libs/SpecUtils/d3_resources/SpectrumChartD3.js"
"${CMAKE_CURRENT_BINARY_DIR}/InterSpec_resources/SpectrumChartD3.js"
Expand Down Expand Up @@ -841,7 +842,7 @@ endif( WIN32 )
#endif()


list( APPEND OTHER_SUPPORT_FILES
list( APPEND OTHER_InterSpec_SUPPORT_FILES
${CMAKE_CURRENT_SOURCE_DIR}/README.md
${CMAKE_CURRENT_SOURCE_DIR}/data/default_preferences.xml
${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/themes/dark/dark.css
Expand All @@ -851,11 +852,11 @@ list( APPEND OTHER_SUPPORT_FILES

FILE(GLOB CSS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/*.css )
list(FILTER CSS_FILES EXCLUDE REGEX ".*SpectrumChartD3.*css")
list(APPEND OTHER_SUPPORT_FILES ${CSS_FILES})
list(APPEND OTHER_InterSpec_SUPPORT_FILES ${CSS_FILES})

list(
APPEND
OTHER_SUPPORT_FILES
OTHER_InterSpec_SUPPORT_FILES
${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/DecayChainChart.js
${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/RelEffPlot.js
${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/DetectionLimitTool.js
Expand All @@ -864,12 +865,12 @@ list(
FILE(GLOB HELP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/static_text/*help.xml)
list(
APPEND
OTHER_SUPPORT_FILES
OTHER_InterSpec_SUPPORT_FILES
${HELP_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/InterSpec_resources/static_text/help.json
)

add_custom_target(interspec_resources SOURCES ${OTHER_SUPPORT_FILES})
add_custom_target(interspec_resources SOURCES ${OTHER_InterSpec_SUPPORT_FILES})


#Copy files to the install directory
Expand Down
2 changes: 1 addition & 1 deletion src/LeafletRadMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ std::string LeafletRadMap::createGeoLocationJson( const std::shared_ptr<const Sp
Wt::Json::Object sample_json;
if( !SpecUtils::is_special(meas_start_time) )
{
const auto duration = start_times_offset - meas_start_time;
const auto duration = meas_start_time - start_times_offset;
const auto millisecs = chrono::duration_cast<chrono::milliseconds>(duration);
sample_json["timeOffset"] = static_cast<long long int>( millisecs.count() );
}//if( SpecUtils::is_special(meas_start_time) )
Expand Down

0 comments on commit b6a707d

Please sign in to comment.