get the JS wrappers working again (#4056)

This commit is contained in:
Greg Landrum
2021-04-19 16:26:22 +02:00
committed by GitHub
parent 83aa4850bf
commit 319d7b872a
2 changed files with 16 additions and 11 deletions

View File

@@ -18,12 +18,17 @@
using namespace RDKit;
extern std::string process_details(const std::string &details,
unsigned int &width, unsigned int &height,
int &offsetx, int &offsety,
std::string &legend,
std::vector<int> &atomIds,
std::vector<int> &bondIds);
namespace RDKit {
namespace MinimalLib{
extern std::string process_details(const std::string &details, unsigned int &width,
unsigned int &height, int &offsetx, int &offsety,
std::string &legend, std::vector<int> &atomIds,
std::vector<int> &bondIds);
}
}
namespace {
std::string draw_to_canvas_with_offset(JSMol &self, emscripten::val canvas,
@@ -65,7 +70,7 @@ std::string draw_to_canvas_with_highlights(JSMol &self, emscripten::val canvas,
int offsetx = 0;
int offsety = 0;
std::string legend = "";
auto problems = process_details(details, w, h, offsetx, offsety, legend,
auto problems = MinimalLib::process_details(details, w, h, offsetx, offsety, legend,
atomIds, bondIds);
if (!problems.empty()) {
return problems;
@@ -146,4 +151,4 @@ EMSCRIPTEN_BINDINGS(RDKit_minimal) {
function("get_inchikey_for_inchi", &get_inchikey_for_inchi);
function("get_mol", &get_mol, allow_raw_pointers());
function("get_qmol", &get_qmol, allow_raw_pointers());
}
}