Skip to content

Commit

Permalink
Merge branch 'master' into camera-clipbounds
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey authored Aug 21, 2018
2 parents 91a0a1f + 95c1e62 commit 05a2485
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 57 deletions.
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,6 @@ if(NOT NPM_EXECUTABLE)
message(FATAL_ERROR "npm is required for many tests")
endif()

function(add_geojs_test test_name)
add_test(
NAME "${test_name}"
WORKING_DIRECTORY "${GEOJS_DEPLOY_DIR}"
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_BINARY_DIR}/test/geojs_test_runner.py
${ARGN}
)
set_property(TEST "${test_name}" APPEND PROPERTY DEPENDS "notes-reset")
set_property(TEST "notes-report" APPEND PROPERTY DEPENDS "${test_name}")
endfunction()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/runners/geojs_test_runner.py.in
${CMAKE_CURRENT_BINARY_DIR}/test/geojs_test_runner.py
)

# Generate notes to send along with the test reports
add_test(
NAME "notes-reset"
Expand Down
7 changes: 5 additions & 2 deletions src/canvas/quadFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ var canvas_quadFeature = function (arg) {
if (!quad.crop) {
context2d.drawImage(src, 0, 0);
} else {
context2d.drawImage(src, 0, 0, quad.crop.x, quad.crop.y, 0, 0,
quad.crop.x, quad.crop.y);
var cropx = Math.min(src.w, quad.crop.x),
cropy = Math.min(src.h, quad.crop.y);
if (cropx > 0 && cropy > 0) {
context2d.drawImage(src, 0, 0, cropx, cropy, 0, 0, cropx, cropy);
}
}
});
});
Expand Down
39 changes: 0 additions & 39 deletions tests/runners/geojs_test_runner.py.in

This file was deleted.

0 comments on commit 05a2485

Please sign in to comment.